lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
lintel::StartupBuilder Class Reference

#include <StartupBuilder.h>

Public Member Functions

 StartupBuilder (ProcessName &&processName, std::vector< std::string > &&arguments)
 
 StartupBuilder ()=delete
 
void addConfigurationComponent (std::shared_ptr< Component > &&component)
 
template<typename FEATURE >
void addFeature ()
 
void disableBootstrapService ()
 
void withOutFeature (std::string_view nameOfFeature)
 
void overrides (EnvironmentConfiguration::Environment environment, std::string value)
 
void onShutdown ()
 
void signalThreadLoop ()
 
void start ()
 

Static Public Member Functions

static std::shared_ptr< StartupBuilder > with (int argc, char **argv)
 

Detailed Description

Builder for application startup lifecycle, managing features, configuration, and signal handling.

Constructor & Destructor Documentation

◆ StartupBuilder() [1/2]

lintel::StartupBuilder::StartupBuilder ( ProcessName &&  processName,
std::vector< std::string > &&  arguments 
)

Construct a StartupBuilder with a process name and command-line arguments.

Parameters
processNamethe name identifying this process
argumentsthe command-line arguments

◆ StartupBuilder() [2/2]

lintel::StartupBuilder::StartupBuilder ( )
delete

Member Function Documentation

◆ addConfigurationComponent()

void lintel::StartupBuilder::addConfigurationComponent ( std::shared_ptr< Component > &&  component)

Register a configuration component.

Parameters
componentthe component to add

◆ addFeature()

template<typename FEATURE >
void lintel::StartupBuilder::addFeature ( )
inline

Register a feature by its type. The feature is instantiated with the shared feature set.

Template Parameters
FEATUREthe feature type to add

◆ disableBootstrapService()

void lintel::StartupBuilder::disableBootstrapService ( )

Disable the bootstrap service on startup.

◆ onShutdown()

void lintel::StartupBuilder::onShutdown ( )

Perform shutdown logic, notifying all registered services.

◆ overrides()

void lintel::StartupBuilder::overrides ( EnvironmentConfiguration::Environment  environment,
std::string  value 
)

Override an environment configuration value.

Parameters
environmentthe environment to override
valuethe override value

◆ signalThreadLoop()

void lintel::StartupBuilder::signalThreadLoop ( )

Internal signal-handling thread loop.

◆ start()

void lintel::StartupBuilder::start ( )

Start all features, services, and begin the application main loop.

◆ with()

static std::shared_ptr< StartupBuilder > lintel::StartupBuilder::with ( int  argc,
char **  argv 
)
static

Factory method to create a StartupBuilder from argc/argv.

Parameters
argcargument count
argvargument vector
Returns
shared pointer to the new StartupBuilder

◆ withOutFeature()

void lintel::StartupBuilder::withOutFeature ( std::string_view  nameOfFeature)

Exclude a named feature from the startup sequence.

Parameters
nameOfFeaturethe feature name to exclude

The documentation for this class was generated from the following file: