controller

package
v0.0.0-...-a7167c7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destruct

func Destruct[T any](obj T) (*unstructured.Unstructured, error)

func Restructure

func Restructure[T any](obj any) (any, error)

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(f ...ControllerOptionFunc) *Controller

func (*Controller) Start

func (c *Controller) Start()

Starts starts the informers and blocks until a stop signal is received

type ControllerOptionFunc

type ControllerOptionFunc func(*ControllerOptions)

func WithCallback

func WithCallback(callback CallbackFunc) ControllerOptionFunc

func WithClient

func WithClient(client *dynamic.DynamicClient) ControllerOptionFunc

func WithInformer

func WithInformer(name string, informer InformerBuilder) ControllerOptionFunc

func WithObjectKinds

func WithObjectKinds(objectKinds ...schema.GroupKind) ControllerOptionFunc
func WithObjectLinks(objectLinks ...RuntimeLinkFunc) ControllerOptionFunc

func WithPolicyKinds

func WithPolicyKinds(policyKinds ...schema.GroupKind) ControllerOptionFunc

type ControllerOptions

type ControllerOptions struct {
	// contains filtered or unexported fields
}

type EventType

type EventType int
const (
	CreateEvent EventType = iota
	UpdateEvent
	DeleteEvent
)

func (*EventType) String

func (t *EventType) String() string

type GatewayAPITopology

type GatewayAPITopology struct {
	// contains filtered or unexported fields
}

func NewGatewayAPITopology

func NewGatewayAPITopology(policyKinds, objectKinds []schema.GroupKind, objectLinks []RuntimeLinkFunc) *GatewayAPITopology

func (*GatewayAPITopology) Get

func (*GatewayAPITopology) Refresh

func (t *GatewayAPITopology) Refresh(objs Store)

type InformerBuilder

type InformerBuilder func(controller *Controller) cache.SharedInformer

type InformerBuilderOptions

type InformerBuilderOptions struct {
	LabelSelector string
	FieldSelector string
}

type InformerBuilderOptionsFunc

type InformerBuilderOptionsFunc func(*InformerBuilderOptions)

func FilterResourcesByField

func FilterResourcesByField(selector string) InformerBuilderOptionsFunc

func FilterResourcesByLabel

func FilterResourcesByLabel(selector string) InformerBuilderOptionsFunc

type Object

type Object struct {
	RuntimeObject RuntimeObject
}

func (*Object) GetName

func (g *Object) GetName() string

func (*Object) GetNamespace

func (g *Object) GetNamespace() string

func (*Object) GetURL

func (g *Object) GetURL() string

func (*Object) GroupVersionKind

func (g *Object) GroupVersionKind() schema.GroupVersionKind

func (*Object) SetGroupVersionKind

func (g *Object) SetGroupVersionKind(schema.GroupVersionKind)

type RuntimeLinkFunc

type RuntimeLinkFunc func(objs Store) machinery.LinkFunc

type RuntimeObject

type RuntimeObject interface {
	runtime.Object
	metav1.Object
}

type Store

type Store map[schema.GroupKind]map[string]RuntimeObject

Jump to

Keyboard shortcuts

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