event

package
v0.0.0-...-6da7b20 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delete

type Delete struct {
	Type Type
	Kind Kind
	Key  types.NamespacedName
}

func NewEventDelete

func NewEventDelete(kind Kind, key types.NamespacedName) *Delete

NewEventDelete returns a Delete event

func (*Delete) GetType

func (e *Delete) GetType() Type

func (*Delete) String

func (e *Delete) String() string

type Event

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

Event defines an event sent to/from the operator

type Kind

type Kind int

Kind specifies the Kind of object under deletion

const (
	KindLiveKitMesh Kind = iota + 1
	KindUnknown
)

func (Kind) String

func (a Kind) String() string

String returns a string representation for an event

type Render

type Render struct {
	Type Type
}

func NewEventRender

func NewEventRender() *Render

NewEventRender returns an event with the corresponding resource

func (*Render) GetType

func (e *Render) GetType() Type

func (*Render) String

func (e *Render) String() string

type Type

type Type int

Type specifies the type of event sent to the operator

const (
	TypeRender Type = iota + 1
	TypeUpsert
	TypeDelete
	TypeUpdate
	TypeUnknown
)

func NewEventType

func NewEventType(raw string) (Type, error)

NewEventType parses an event type specification

func (Type) String

func (a Type) String() string

String returns a string representation for an event

type Update

type Update struct {
	Type        Type
	UpsertQueue UpdateConf
	DeleteQueue UpdateConf
	Generation  int
}

func NewEventUpdate

func NewEventUpdate(generation int) *Update

NewEventUpdate returns an empty event

func (*Update) GetType

func (e *Update) GetType() Type

func (*Update) String

func (e *Update) String() string

type UpdateConf

type UpdateConf struct {
	ConfigMaps          *store.ConfigMapStore
	LiveKitMeshes       *store.LiveKitMeshStore
	Services            *store.ServiceStore
	Deployments         *store.DeploymentStore
	Issuer              *store.IssuerStore
	Secrets             *store.SecretStore
	StatefulSets        *store.StatefulSetStore
	UDPRoutes           *store.UDPRouteStore
	HTTPRoutes          *store.HTTPRouteStore
	TCPRoutes           *store.TCPRouteStore
	Gateways            *store.GatewayStore
	GatewayClasses      *store.GatewayClassStore
	GatewayConfigs      *store.GatewayConfigStore
	ServiceAccounts     *store.ServiceAccountStore
	ClusterRoles        *store.ClusterRoleStore
	ClusterRoleBindings *store.ClusterRoleBindingStore
}

UpdateConf render event

type Upsert

type Upsert struct {
	Type   Type
	Object client.Object
}

func NewEventUpsert

func NewEventUpsert(o client.Object) *Upsert

NewEventUpsert returns a new Upsert event

func (*Upsert) GetType

func (e *Upsert) GetType() Type

func (*Upsert) String

func (e *Upsert) String() string

Jump to

Keyboard shortcuts

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