Documentation ¶
Index ¶
- Variables
- type APICacheInterface
- type APICaches
- type CacheManagerAdder
- type CacheManagerReader
- type CacheManagerReaderAdder
- type Manager
- func (cm *Manager) AddForeignEventHandlers(api apimgmt.ApiType, namespace string, ...) error
- func (cm *Manager) AddForeignNamespace(namespace string) error
- func (cm *Manager) AddHomeEventHandlers(api apimgmt.ApiType, namespace string, ...) error
- func (cm *Manager) AddHomeNamespace(namespace string) error
- func (cm *Manager) GetForeignAPIByIndex(api apimgmt.ApiType, namespace, index string) (interface{}, error)
- func (cm *Manager) GetForeignNamespacedObject(api apimgmt.ApiType, namespace, name string) (interface{}, error)
- func (cm *Manager) GetHomeAPIByIndex(api apimgmt.ApiType, namespace, index string) (interface{}, error)
- func (cm *Manager) GetHomeNamespacedObject(api apimgmt.ApiType, namespace, name string) (interface{}, error)
- func (cm *Manager) ListForeignNamespacedObject(api apimgmt.ApiType, namespace string) ([]interface{}, error)
- func (cm *Manager) ListHomeNamespacedObject(api apimgmt.ApiType, namespace string) ([]interface{}, error)
- func (cm *Manager) RemoveNamespace(namespace string)
- func (cm *Manager) StartForeignNamespace(foreignNamespace string, stop chan struct{}) error
- func (cm *Manager) StartHomeNamespace(homeNamespace string, stop chan struct{}) error
- type NamespacedAPICaches
Constants ¶
This section is empty.
Variables ¶
var InformerBuilders = map[apimgmt.ApiType]func(informers.SharedInformerFactory) cache.SharedIndexInformer{ apimgmt.Configmaps: configmapsInformerBuilder, apimgmt.Pods: podsInformerBuilder, apimgmt.ReplicaSets: replicaSetsInformerBuilder, apimgmt.Secrets: secretsInformerBuilder, }
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 ¶
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 ¶
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 ¶
RemoveNamespace removes a namespace from the list of observed ones.
func (*Manager) StartForeignNamespace ¶
StartForeignNamespace starts observing a given foreign namespace (after having been added).
func (*Manager) StartHomeNamespace ¶
StartHomeNamespace starts observing a given home namespace (after having been added).
type NamespacedAPICaches ¶
func (*NamespacedAPICaches) AddNamespace ¶
func (ac *NamespacedAPICaches) AddNamespace(namespace string) error
func (*NamespacedAPICaches) Namespace ¶
func (ac *NamespacedAPICaches) Namespace(namespace string) *APICaches