Documentation
¶
Index ¶
Constants ¶
const ( // ComponentName is the unique identifier for this component. ComponentName = "credentialsloader" // EventBufferSize is the size of the event subscription buffer. // Low-volume component (~1 event per secret change). EventBufferSize = busevents.StandardSubscriberBuffer )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialsLoaderComponent ¶
type CredentialsLoaderComponent struct {
*resourceloader.BaseLoader
}
CredentialsLoaderComponent subscribes to SecretResourceChangedEvent and parses Secret data.
This component is responsible for: - Extracting credentials from Secret resources - Parsing Secret data into config.Credentials structures - Publishing CredentialsUpdatedEvent for successfully loaded credentials - Publishing CredentialsInvalidEvent for invalid credentials
Architecture: This is a pure event-driven component with no knowledge of watchers or Kubernetes. It simply reacts to SecretResourceChangedEvent and produces CredentialsUpdatedEvent or CredentialsInvalidEvent.
func NewCredentialsLoaderComponent ¶
func NewCredentialsLoaderComponent(eventBus *busevents.EventBus, logger *slog.Logger) *CredentialsLoaderComponent
NewCredentialsLoaderComponent creates a new CredentialsLoader component.
Parameters:
- eventBus: The EventBus to subscribe to and publish on
- logger: Structured logger for diagnostics
Returns:
- *CredentialsLoaderComponent ready to start
func (*CredentialsLoaderComponent) ProcessEvent ¶
func (c *CredentialsLoaderComponent) ProcessEvent(event busevents.Event)
ProcessEvent handles a single event from the EventBus.