informer

package
v0.0.0-...-f43927d Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewResourceController

func NewResourceController(informer cache.SharedIndexInformer, resourceType interface{}, eventHandlers ...Handler) (*Controller, error)

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

HasSynced is required for the cache.Controller interface.

func (*Controller) LastSyncResourceVersion

func (c *Controller) LastSyncResourceVersion() string

LastSyncResourceVersion is required for the cache.Controller interface.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run waits for informer to be synced and starts processing queue

func (*Controller) RunAndWait

func (c *Controller) RunAndWait(stopCh <-chan struct{})

type Event

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

Event indicate the informerEvent

type Handler

type Handler interface {
	Init() error
	ObjectCreated(obj runtime.Object)
	ObjectDeleted(obj runtime.Object)
	ObjectUpdated(oldObj, newObj runtime.Object)
}

type ServiceExportEventHandler

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

ServiceExportEventHandler processes Service events and triggers proper FDS/MCP pushes if an event matches export rules.

func NewServiceExportEventHandler

func NewServiceExportEventHandler(
	cfg config.Federation,
	fdsPushRequests,
	mcpPushRequests chan<- xds.PushRequest,
) *ServiceExportEventHandler

func (*ServiceExportEventHandler) Init

func (w *ServiceExportEventHandler) Init() error

func (*ServiceExportEventHandler) ObjectCreated

func (w *ServiceExportEventHandler) ObjectCreated(obj runtime.Object)

func (*ServiceExportEventHandler) ObjectDeleted

func (w *ServiceExportEventHandler) ObjectDeleted(obj runtime.Object)

func (*ServiceExportEventHandler) ObjectUpdated

func (w *ServiceExportEventHandler) ObjectUpdated(oldObj, newObj runtime.Object)

Jump to

Keyboard shortcuts

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