Documentation
¶
Index ¶
Constants ¶
const ( // ComponentName is the unique identifier for this component. ComponentName = "config-publisher" // EventBufferSize is the buffer size for the event subscription channel. EventBufferSize = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the event adapter for the config publisher. It wraps the pure Publisher component and coordinates it with the event bus.
This component caches information from multiple events (ConfigValidatedEvent, TemplateRenderedEvent) and publishes runtime config resources only after successful HAProxy validation (ValidationCompletedEvent).
func New ¶
func New( publisher *configpublisher.Publisher, eventBus *busevents.EventBus, logger *slog.Logger, ) *Component
New creates a new config publisher component.
func (*Component) Name ¶
Name returns the unique identifier for this component. Implements the lifecycle.Component interface.
func (*Component) Start ¶
Start begins the config publisher's event loop.
This method blocks until the context is cancelled or an error occurs. It processes events from the subscription channel established in the constructor.
Parameters:
- ctx: Context for cancellation and lifecycle management
Returns:
- nil when context is cancelled (graceful shutdown)
- Error only in exceptional circumstances