Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ComponentName is the unique identifier for this component. ComponentName = "configloader" // EventBufferSize is the size of the event subscription buffer. // Size 50: Low-volume component (~1 event per config change). EventBufferSize = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLoaderComponent ¶
type ConfigLoaderComponent struct {
*resourceloader.BaseLoader
}
ConfigLoaderComponent subscribes to ConfigResourceChangedEvent and parses config data.
This component is responsible for: - Converting HAProxyTemplateConfig CRD Spec to config.Config - Publishing ConfigParsedEvent for successfully parsed configs - Logging errors for conversion failures
Architecture: This is a pure event-driven component with no knowledge of watchers or Kubernetes. It simply reacts to ConfigResourceChangedEvent and produces ConfigParsedEvent.
func NewConfigLoaderComponent ¶
func NewConfigLoaderComponent(eventBus *busevents.EventBus, logger *slog.Logger) *ConfigLoaderComponent
NewConfigLoaderComponent creates a new ConfigLoader component.
Parameters:
- eventBus: The EventBus to subscribe to and publish on
- logger: Structured logger for diagnostics
Returns:
- *ConfigLoaderComponent ready to start
func (*ConfigLoaderComponent) ProcessEvent ¶
func (c *ConfigLoaderComponent) ProcessEvent(event busevents.Event)
ProcessEvent handles a single event from the EventBus.
Click to show internal directories.
Click to hide internal directories.