Documentation ¶
Overview ¶
Package reflection implements the reflection logic of custom resources between a local cluster to a remote one.
Index ¶
- func LocalResourcesLabelSelector() metav1.LabelSelector
- func ReplicatedResourcesLabelSelector() metav1.LabelSelector
- type Manager
- type Reflector
- func (r *Reflector) ResourceStarted(resource *resources.Resource) bool
- func (r *Reflector) Start(ctx context.Context)
- func (r *Reflector) StartForResource(ctx context.Context, resource *resources.Resource)
- func (r *Reflector) Stop() error
- func (r *Reflector) StopForResource(resource *resources.Resource) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalResourcesLabelSelector ¶
func LocalResourcesLabelSelector() metav1.LabelSelector
LocalResourcesLabelSelector is an helper function which returns a label selector to list all the local resources to be replicated.
func ReplicatedResourcesLabelSelector ¶
func ReplicatedResourcesLabelSelector() metav1.LabelSelector
ReplicatedResourcesLabelSelector is an helper function which returns a label selector to list all the replicated resources.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents an object creating reflectors towards remote clusters.
func NewManager ¶
func NewManager(client dynamic.Interface, clusterID string, workersPerCluster uint, resync time.Duration) *Manager
NewManager returns a new manager to start the reflection towards remote clusters.
type Reflector ¶
Reflector represents an object managing the reflection of resources towards a given remote cluster.
func (*Reflector) ResourceStarted ¶
ResourceStarted returns whether the reflection for the given resource has been started.
func (*Reflector) StartForResource ¶
StartForResource starts the reflection of the given resource. It panics if executed for a resource with the reflection already started.