certloader

package
v0.1.0-alpha.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL