event

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigConf added in v0.17.0

type ConfigConf = []*stnrv1.StunnerConfig

render event

type Event

type Event interface {
	GetType() EventType
	String() string
}

Event defines an event sent to/from the operator

type EventDelete

type EventDelete struct {
	Type EventType
	Kind EventKind
	Key  types.NamespacedName
}

func NewEventDelete

func NewEventDelete(kind EventKind, key types.NamespacedName) *EventDelete

NewEventDelete returns a Delete event

func (*EventDelete) GetType

func (e *EventDelete) GetType() EventType

func (*EventDelete) String

func (e *EventDelete) String() string

type EventKind

type EventKind int

EventType specifies the Kind of an object under deletion

const (
	EventKindGatewayClass EventKind = iota + 1
	EventKindGatewayConfig
	EventKindGateway
	EventKindUDPRoute
	EventKindService
	EventKindNode
	EventKindEndpoint
	EventKindUnknown
)

func (EventKind) String

func (a EventKind) String() string

String returns a string representation for an event

type EventRender

type EventRender struct {
	Type EventType
}

func NewEventRender

func NewEventRender() *EventRender

NewEvent returns an empty event

func (*EventRender) GetType

func (e *EventRender) GetType() EventType

func (*EventRender) String

func (e *EventRender) String() string

type EventType

type EventType int

EventType specifies the type of an event sent to the operator

const (
	EventTypeRender EventType = iota + 1
	EventTypeUpsert
	EventTypeDelete
	EventTypeUpdate
	EventTypeUnknown
)

func NewEventType

func NewEventType(raw string) (EventType, error)

NewEventType parses an event type specification

func (EventType) String

func (a EventType) String() string

String returns a string representation for an event

type EventUpdate

type EventUpdate struct {
	Type        EventType
	UpsertQueue UpdateConf
	DeleteQueue UpdateConf
	ConfigQueue ConfigConf
	Generation  int
}

func NewEventUpdate

func NewEventUpdate(generation int) *EventUpdate

NewEvent returns an empty event

func (*EventUpdate) DeepCopy added in v0.18.0

func (e *EventUpdate) DeepCopy() *EventUpdate

DeepCopy copies all updated resources into a new update event. This is required to elide locking across the renderer thread and the updater thread.

func (*EventUpdate) GetType

func (e *EventUpdate) GetType() EventType

func (*EventUpdate) String

func (e *EventUpdate) String() string

type EventUpsert

type EventUpsert struct {
	Type   EventType
	Object client.Object
}

func NewEventUpsert

func NewEventUpsert(o client.Object) *EventUpsert

NewEvent returns a new Upsert event

func (*EventUpsert) GetType

func (e *EventUpsert) GetType() EventType

func (*EventUpsert) String

func (e *EventUpsert) String() string

type UpdateConf

type UpdateConf struct {
	GatewayClasses *store.GatewayClassStore
	Gateways       *store.GatewayStore
	UDPRoutes      *store.UDPRouteStore
	UDPRoutesV1A2  *store.UDPRouteStore
	Services       *store.ServiceStore
	ConfigMaps     *store.ConfigMapStore
	Deployments    *store.DeploymentStore
}

Jump to

Keyboard shortcuts

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