Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
unified_bootstrapper.h File Reference

Unified system bootstrapper for initialization and shutdown. More...

#include "service_container.h"
#include "../interfaces/logger_interface.h"
#include "../concepts/service.h"
#include "../config/feature_system_deps.h"
#include <atomic>
#include <chrono>
#include <csignal>
#include <functional>
#include <memory>
#include <mutex>
#include <string_view>
#include <vector>
Include dependency graph for unified_bootstrapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::common::di::bootstrapper_options
 Configuration options for the unified bootstrapper. More...
 
class  kcenon::common::di::unified_bootstrapper
 Coordinates system initialization and shutdown. More...
 
struct  kcenon::common::di::unified_bootstrapper::shutdown_hook_entry
 
struct  kcenon::common::di::unified_bootstrapper::module_entry
 

Namespaces

namespace  kcenon
 
namespace  kcenon::common
 Core interfaces.
 
namespace  kcenon::common::di
 

Typedefs

using kcenon::common::di::shutdown_hook = std::function<void(std::chrono::milliseconds remaining_timeout)>
 Shutdown hook callback type.
 
using kcenon::common::di::module_registration_fn = std::function<VoidResult(IServiceContainer&)>
 Module registration callback type.
 

Detailed Description

Unified system bootstrapper for initialization and shutdown.

This header provides a unified bootstrapper that coordinates the initialization and shutdown of all system components through the service container.

Thread Safety:

  • unified_bootstrapper is thread-safe for concurrent initialization checks.
  • initialize() and shutdown() should be called from a single thread.
  • Once initialized, services() can be called from any thread.

Signal Handling:

  • Automatically registers handlers for SIGTERM and SIGINT.
  • Graceful shutdown is triggered on signal receipt.
See also
TICKET-104 for implementation requirements.
service_container.h for dependency injection container.

Definition in file unified_bootstrapper.h.