Documentation
¶
Index ¶
Constants ¶
const ( // ComponentName is the unique identifier for this component. ComponentName = "certloader" // EventBufferSize is the size of the event subscription buffer. // Size 50: Low-volume component (~1 event per certificate change). EventBufferSize = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertLoaderComponent ¶
type CertLoaderComponent struct {
*resourceloader.BaseLoader
}
CertLoaderComponent subscribes to CertResourceChangedEvent and extracts TLS certificate data.
This component is responsible for: - Extracting TLS certificate data from Secret resources - Validating certificate keys exist (tls.crt, tls.key) - Publishing CertParsedEvent for successfully extracted certificates - Logging errors for invalid or missing certificate data
Architecture: This is a pure event-driven component with no knowledge of watchers or Kubernetes. It simply reacts to CertResourceChangedEvent and produces CertParsedEvent.
func NewCertLoaderComponent ¶
func NewCertLoaderComponent(eventBus *busevents.EventBus, logger *slog.Logger) *CertLoaderComponent
NewCertLoaderComponent creates a new CertLoader component.
Parameters:
- eventBus: The EventBus to subscribe to and publish on
- logger: Structured logger for diagnostics
Returns:
- *CertLoaderComponent ready to start
func (*CertLoaderComponent) ProcessEvent ¶
func (c *CertLoaderComponent) ProcessEvent(event busevents.Event)
ProcessEvent handles a single event from the EventBus.