informer

package
v0.0.0-...-e1628ab Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReflectorBuilder

func NewReflectorBuilder(client *client.Client) informer.NewReflectorFunc

NewReflectorBuilder return a NewReflectorFunc with giving client

func NewTaskMonitor

func NewTaskMonitor(towerFactory SharedInformerFactory) client.TaskMonitor

func ReconcileWorker

func ReconcileWorker(name string, queue workqueue.RateLimitingInterface, processFunc func(string) error) func()

func TowerObjectKey

func TowerObjectKey(obj interface{}) (string, error)

Types

type EventUnmarshalable

type EventUnmarshalable interface {
	UnmarshalEvent(raw json.RawMessage, event *schema.MutationEvent) error
}

EventUnmarshalable allow to mutate the default json decoder

type KeyLister

type KeyLister interface {

	// ListKeys returns the storage keys of the stored objects
	ListKeys() []string

	// IndexKeys returns the storage keys of the stored objects whose
	// set of indexed values for the named index includes the given
	// indexed value
	IndexKeys(indexName, indexedValue string) ([]string, error)
}

KeyLister know how to list keys from store.

type Lister

type Lister interface {
	KeyLister

	// List returns a list of all the currently non-empty accumulators
	List() []interface{}

	// GetByKey returns the accumulator associated with the given key
	GetByKey(key string) (interface{}, bool, error)

	// ByIndex returns the stored objects whose set of indexed values
	// for the named index includes the given indexed value
	ByIndex(indexName, indexedValue string) ([]interface{}, error)
}

Lister know how to list and get object from store.

type Queryable

type Queryable interface {
	GetQueryRequest(skipFields map[string][]string) string
}

Queryable allow to mutate the default query request

type SharedInformerFactory

type SharedInformerFactory interface {
	// Start initializes all requested informers
	Start(stopCh <-chan struct{})
	// WaitForCacheSync waits for all started informers' cache were synced
	WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
	// InformerFor returns the SharedIndexInformer for obj using an internal client.
	InformerFor(obj schema.Object) cache.SharedIndexInformer

	// VM return informer for &schema.VM{}
	VM() cache.SharedIndexInformer
	// Label return informer for &schema.Label{}
	Label() cache.SharedIndexInformer
	// SecurityPolicy return informer for &schema.SecurityPolicy{}
	SecurityPolicy() cache.SharedIndexInformer
	// IsolationPolicy return informer for &schema.IsolationPolicy{}
	IsolationPolicy() cache.SharedIndexInformer
	// Host return informer for &schema.Host{}
	Host() cache.SharedIndexInformer
	// EverouteCluster return informer for &schema.EverouteCluster{}
	EverouteCluster() cache.SharedIndexInformer
	// SystemEndpoints return informer for &schema.SystemEndpoints{}
	SystemEndpoints() cache.SharedIndexInformer
	// Task return informer for &schema.Task{}
	Task() cache.SharedIndexInformer
	// SecurityGroup return informer for &schema.SecurityGroup{}
	SecurityGroup() cache.SharedIndexInformer
	// Service return informer for &schema.Service{}
	Service() cache.SharedIndexInformer
}

SharedInformerFactory provides shared informers for all resources

func NewSharedInformerFactory

func NewSharedInformerFactory(client *client.Client, defaultResync time.Duration) SharedInformerFactory

NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all resources

type SliceUnmarshalable

type SliceUnmarshalable interface {
	UnmarshalSlice(raw json.RawMessage, slice interface{}) error
}

SliceUnmarshalable allow to mutate the default json decoder

type Subscribable

type Subscribable interface {
	GetSubscriptionRequest(skipFields map[string][]string) string
}

Subscribable allow to mutate the default subscription request

Jump to

Keyboard shortcuts

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