Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder watches OpenChoreo Kubernetes resources and forwards change-notification webhooks to configured subscribers (typically the Backstage events plugin). It uses Kubernetes informers internally — the K8s "watch" terminology refers to the informer mechanism, while this component itself is named "event-forwarder" to describe its outward role: turning K8s events into HTTP webhooks that drive downstream catalog updates.
func New ¶
func New(client dynamic.Interface, d *dispatcher.Dispatcher, logger *slog.Logger) *Forwarder
New creates a new Forwarder.
func (*Forwarder) Start ¶
Start begins watching all OpenChoreo resources (and OC-labeled core Namespaces) and blocks until the context is canceled.
`onReady`, if non-nil, is invoked exactly once after every informer cache has finished its initial list — the moment the forwarder will start delivering events. Callers use this to flip readiness probes to "ready" so a rolling-update doesn't route traffic to this pod before it can actually consume events.
type HealthServer ¶
type HealthServer struct {
// contains filtered or unexported fields
}
HealthServer provides /health and /ready endpoints.
func NewHealthServer ¶
func NewHealthServer(logger *slog.Logger) *HealthServer
NewHealthServer creates a new HealthServer.
func (*HealthServer) Handler ¶
func (s *HealthServer) Handler() http.Handler
Handler returns an http.Handler with /health and /ready routes.
func (*HealthServer) ListenAndServe ¶
func (s *HealthServer) ListenAndServe(port int) error
ListenAndServe starts the health server on the given port.
func (*HealthServer) SetReady ¶
func (s *HealthServer) SetReady()
SetReady marks the server as ready to receive traffic.