reporter

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package reporter contains various methods to report status updates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngressEventReporter

type IngressEventReporter struct {
	record.EventRecorder
}

IngressEventReporter reflects updates as events posted to the ingress

func (*IngressEventReporter) IngressDeleted

IngressDeleted an ingress resource was deleted and Pomerium no longer serves it

func (*IngressEventReporter) IngressNotReconciled

func (r *IngressEventReporter) IngressNotReconciled(_ context.Context, ingress *networkingv1.Ingress, reason error) error

IngressNotReconciled an updated ingress resource was received, however it could not be reconciled with Pomerium due to errors

func (*IngressEventReporter) IngressReconciled

func (r *IngressEventReporter) IngressReconciled(_ context.Context, ingress *networkingv1.Ingress) error

IngressReconciled an ingress was successfully reconciled with Pomerium

type IngressLogReporter

type IngressLogReporter struct {
	// V is target log level verbosity
	V int
	// Name is the name of the logger
	Name string
}

IngressLogReporter reflects updates as log messages

func (*IngressLogReporter) IngressDeleted

func (r *IngressLogReporter) IngressDeleted(ctx context.Context, name types.NamespacedName, reason string) error

IngressDeleted an ingress resource was deleted and Pomerium no longer serves it

func (*IngressLogReporter) IngressNotReconciled

func (r *IngressLogReporter) IngressNotReconciled(ctx context.Context, ingress *networkingv1.Ingress, reason error) error

IngressNotReconciled an updated ingress resource was received, however it could not be reconciled with Pomerium due to errors

func (*IngressLogReporter) IngressReconciled

func (r *IngressLogReporter) IngressReconciled(ctx context.Context, ingress *networkingv1.Ingress) error

IngressReconciled an ingress was successfully reconciled with Pomerium

type IngressSettingsEventReporter

type IngressSettingsEventReporter struct {
	SettingsReporter
	record.EventRecorder
}

IngressSettingsEventReporter posts ingress updates as events to Settings CRD

func (*IngressSettingsEventReporter) IngressDeleted

func (r *IngressSettingsEventReporter) IngressDeleted(ctx context.Context, ingress types.NamespacedName, reason string) error

IngressDeleted an ingress resource was deleted and Pomerium no longer serves it

func (*IngressSettingsEventReporter) IngressNotReconciled

func (r *IngressSettingsEventReporter) IngressNotReconciled(ctx context.Context, ingress *networkingv1.Ingress, reason error) error

IngressNotReconciled an updated ingress resource was received, however it could not be reconciled with Pomerium due to errors

func (*IngressSettingsEventReporter) IngressReconciled

func (r *IngressSettingsEventReporter) IngressReconciled(ctx context.Context, ingress *networkingv1.Ingress) error

IngressReconciled an ingress was successfully reconciled with Pomerium

type IngressSettingsReporter

type IngressSettingsReporter struct {
	SettingsReporter
}

IngressSettingsReporter reflects ingress updates in a Pomerium Settings CRD /status section

func (*IngressSettingsReporter) IngressDeleted

func (r *IngressSettingsReporter) IngressDeleted(ctx context.Context, name types.NamespacedName, _ string) error

IngressDeleted an ingress resource was deleted and Pomerium no longer serves it

func (*IngressSettingsReporter) IngressNotReconciled

func (r *IngressSettingsReporter) IngressNotReconciled(ctx context.Context, ingress *networkingv1.Ingress, reason error) error

IngressNotReconciled an updated ingress resource was received, however it could not be reconciled with Pomerium due to errors

func (*IngressSettingsReporter) IngressReconciled

func (r *IngressSettingsReporter) IngressReconciled(ctx context.Context, ingress *networkingv1.Ingress) error

IngressReconciled an ingress was successfully reconciled with Pomerium

type IngressStatusReporter

type IngressStatusReporter interface {
	// IngressReconciled an ingress was successfully reconciled with Pomerium
	IngressReconciled(ctx context.Context, ingress *networkingv1.Ingress) error
	// IngressNotReconciled an updated ingress resource was received,
	// however it could not be reconciled with Pomerium due to errors
	IngressNotReconciled(ctx context.Context, ingress *networkingv1.Ingress, reason error) error
	// IngressDeleted an ingress resource was deleted and Pomerium no longer serves it
	IngressDeleted(ctx context.Context, name types.NamespacedName, reason string) error
}

IngressStatusReporter updates status of ingress objects

type MultiIngressStatusReporter

type MultiIngressStatusReporter []IngressStatusReporter

MultiIngressStatusReporter dispatches updates over multiple reporters

func (MultiIngressStatusReporter) IngressDeleted

func (r MultiIngressStatusReporter) IngressDeleted(ctx context.Context, name types.NamespacedName, reason string)

IngressDeleted an ingress resource was deleted and Pomerium no longer serves it

func (MultiIngressStatusReporter) IngressNotReconciled

func (r MultiIngressStatusReporter) IngressNotReconciled(ctx context.Context, ingress *networkingv1.Ingress, reason error)

IngressNotReconciled an updated ingress resource was received, however it could not be reconciled with Pomerium due to errors

func (MultiIngressStatusReporter) IngressReconciled

func (r MultiIngressStatusReporter) IngressReconciled(ctx context.Context, ingress *networkingv1.Ingress)

IngressReconciled an ingress was successfully reconciled with Pomerium

type MultiPomeriumStatusReporter

type MultiPomeriumStatusReporter []PomeriumReporter

MultiPomeriumStatusReporter dispatches updates over multiple reporters

func (MultiPomeriumStatusReporter) SettingsRejected

func (r MultiPomeriumStatusReporter) SettingsRejected(ctx context.Context, obj *icsv1.Pomerium, err error)

SettingsRejected marks that configuration was reconciled

func (MultiPomeriumStatusReporter) SettingsUpdated

func (r MultiPomeriumStatusReporter) SettingsUpdated(ctx context.Context, obj *icsv1.Pomerium)

SettingsUpdated marks that configuration was reconciled

type PomeriumReporter

type PomeriumReporter interface {
	// SettingsUpdated indicates the settings were successfully applied.
	SettingsUpdated(context.Context, *icsv1.Pomerium) error
	// SettingsRejected indicates settings were rejected.
	SettingsRejected(context.Context, *icsv1.Pomerium, error) error
}

PomeriumReporter is used to report pomerium deployment status updates

type SettingsEventReporter

type SettingsEventReporter struct {
	SettingsReporter
	record.EventRecorder
}

SettingsEventReporter posts events to the Settings CRD

func (*SettingsEventReporter) SettingsRejected

func (s *SettingsEventReporter) SettingsRejected(ctx context.Context, obj *icsv1.Pomerium, err error) error

SettingsRejected marks configuration was rejected

func (*SettingsEventReporter) SettingsUpdated

func (s *SettingsEventReporter) SettingsUpdated(ctx context.Context, obj *icsv1.Pomerium) error

SettingsUpdated marks configuration was reconciled with pomerium

type SettingsLogReporter

type SettingsLogReporter struct{}

SettingsLogReporter posts events to the log

func (*SettingsLogReporter) SettingsRejected

func (s *SettingsLogReporter) SettingsRejected(ctx context.Context, _ *icsv1.Pomerium, err error) error

SettingsRejected settings were not synced with Pomerium and provides a reason

func (*SettingsLogReporter) SettingsUpdated

func (s *SettingsLogReporter) SettingsUpdated(ctx context.Context, _ *icsv1.Pomerium) error

SettingsUpdated marks configuration was synced with pomerium

type SettingsReporter

type SettingsReporter struct {
	types.NamespacedName
	client.Client
}

SettingsReporter is a common struct for CRD status updates

type SettingsStatusReporter

type SettingsStatusReporter struct {
	SettingsReporter
}

SettingsStatusReporter is a PomeriumReporter that updates /status of the Settings CRD

func (*SettingsStatusReporter) SettingsRejected

func (s *SettingsStatusReporter) SettingsRejected(ctx context.Context, obj *icsv1.Pomerium, err error) error

SettingsRejected settings was not reconciled with pomerium and provides a reason

func (*SettingsStatusReporter) SettingsUpdated

func (s *SettingsStatusReporter) SettingsUpdated(ctx context.Context, obj *icsv1.Pomerium) error

SettingsUpdated marks that settings was reconciled with pomerium

Jump to

Keyboard shortcuts

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