storage

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InformerBuilders = map[apimgmt.ApiType]func(informers.SharedInformerFactory) cache.SharedIndexInformer{
	apimgmt.Configmaps:  configmapsInformerBuilder,
	apimgmt.Pods:        podsInformerBuilder,
	apimgmt.ReplicaSets: replicaSetsInformerBuilder,
	apimgmt.Secrets:     secretsInformerBuilder,
}
View Source
var InformerIndexers = map[apimgmt.ApiType]func() cache.Indexers{
	apimgmt.Configmaps:  configmapsIndexers,
	apimgmt.Pods:        podsIndexers,
	apimgmt.ReplicaSets: replicasetsIndexers,
	apimgmt.Secrets:     secretsIndexers,
}

Functions

This section is empty.

Types

type APICacheInterface

type APICacheInterface interface {
	// contains filtered or unexported methods
}

type APICaches

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

APICaches represents a set of informers for a set of APIs.

type CacheManagerAdder

type CacheManagerAdder interface {
	AddHomeNamespace(string) error
	AddForeignNamespace(string) error
	StartHomeNamespace(string, chan struct{}) error
	StartForeignNamespace(string, chan struct{}) error
	RemoveNamespace(string)
	AddHomeEventHandlers(apimgmt.ApiType, string, *cache.ResourceEventHandlerFuncs) error
	AddForeignEventHandlers(apimgmt.ApiType, string, *cache.ResourceEventHandlerFuncs) error
}

type CacheManagerReader

type CacheManagerReader interface {
	GetHomeNamespacedObject(apimgmt.ApiType, string, string) (interface{}, error)
	GetForeignNamespacedObject(apimgmt.ApiType, string, string) (interface{}, error)
	ListHomeNamespacedObject(apimgmt.ApiType, string) ([]interface{}, error)
	ListForeignNamespacedObject(apimgmt.ApiType, string) ([]interface{}, error)
	GetHomeAPIByIndex(apimgmt.ApiType, string, string) (interface{}, error)
	GetForeignAPIByIndex(apimgmt.ApiType, string, string) (interface{}, error)
}

type CacheManagerReaderAdder

type CacheManagerReaderAdder interface {
	CacheManagerAdder
	CacheManagerReader
}

type Manager

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

Manager is a structure which wraps the informers used to interact with the home and the foreign cluster, together with the associated caches.

func NewManager

func NewManager(homeClient, foreignClient kubernetes.Interface, resyncPeriod time.Duration) *Manager

NewManager creates a new Manager instance for a given tuple of home and foreign clients.

func (*Manager) AddForeignEventHandlers

func (cm *Manager) AddForeignEventHandlers(api apimgmt.ApiType, namespace string, handlers *cache.ResourceEventHandlerFuncs) error

AddForeignEventHandlers configures the handlers executed on events triggered by modifications of a given API in a foreign namespace.

func (*Manager) AddForeignNamespace

func (cm *Manager) AddForeignNamespace(namespace string) error

AddForeignNamespace adds a given foreign namespace to the list of observed ones.

func (*Manager) AddHomeEventHandlers

func (cm *Manager) AddHomeEventHandlers(api apimgmt.ApiType, namespace string, handlers *cache.ResourceEventHandlerFuncs) error

AddHomeEventHandlers configures the handlers executed on events triggered by modifications of a given API in a home namespace.

func (*Manager) AddHomeNamespace

func (cm *Manager) AddHomeNamespace(namespace string) error

AddHomeNamespace adds a given home namespace to the list of observed ones.

func (*Manager) GetForeignAPIByIndex added in v0.3.0

func (cm *Manager) GetForeignAPIByIndex(api apimgmt.ApiType, namespace, index string) (interface{}, error)

GetForeignAPIByIndex lists the cached objects matching a given index, in a namespace in the foreign cache.

func (*Manager) GetForeignNamespacedObject

func (cm *Manager) GetForeignNamespacedObject(api apimgmt.ApiType, namespace, name string) (interface{}, error)

GetForeignNamespacedObject retrieves a given cached object from the foreign cluster.

func (*Manager) GetHomeAPIByIndex added in v0.3.0

func (cm *Manager) GetHomeAPIByIndex(api apimgmt.ApiType, namespace, index string) (interface{}, error)

GetHomeAPIByIndex lists the cached objects matching a given index, in a namespace in the home cache.

func (*Manager) GetHomeNamespacedObject

func (cm *Manager) GetHomeNamespacedObject(api apimgmt.ApiType, namespace, name string) (interface{}, error)

GetHomeNamespacedObject retrieves a given cached object from the home cluster.

func (*Manager) ListForeignNamespacedObject

func (cm *Manager) ListForeignNamespacedObject(api apimgmt.ApiType, namespace string) ([]interface{}, error)

ListForeignNamespacedObject lists the APIs in a namespace in the foreign cluster.

func (*Manager) ListHomeNamespacedObject

func (cm *Manager) ListHomeNamespacedObject(api apimgmt.ApiType, namespace string) ([]interface{}, error)

ListHomeNamespacedObject lists the cached objects in a namespace in the home cluster.

func (*Manager) RemoveNamespace

func (cm *Manager) RemoveNamespace(namespace string)

RemoveNamespace removes a namespace from the list of observed ones.

func (*Manager) StartForeignNamespace

func (cm *Manager) StartForeignNamespace(foreignNamespace string, stop chan struct{}) error

StartForeignNamespace starts observing a given foreign namespace (after having been added).

func (*Manager) StartHomeNamespace

func (cm *Manager) StartHomeNamespace(homeNamespace string, stop chan struct{}) error

StartHomeNamespace starts observing a given home namespace (after having been added).

type NamespacedAPICaches

type NamespacedAPICaches struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*NamespacedAPICaches) AddNamespace

func (ac *NamespacedAPICaches) AddNamespace(namespace string) error

func (*NamespacedAPICaches) Namespace

func (ac *NamespacedAPICaches) Namespace(namespace string) *APICaches

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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