options

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package options implements the options to configure the reflection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventFilterCreate added in v0.7.0

func EventFilterCreate(et watch.EventType) bool

EventFilterCreate ignores events of type create.

func EventFilterDelete added in v0.7.0

func EventFilterDelete(et watch.EventType) bool

EventFilterDelete ignores events of type delete.

func EventFilterUpdate added in v0.7.0

func EventFilterUpdate(et watch.EventType) bool

EventFilterUpdate ignores events of type update.

Types

type EventFilter added in v0.7.0

type EventFilter func(watch.EventType) bool

EventFilter filters out the events matching a given type.

type Keyer

type Keyer func(metadata metav1.Object) []types.NamespacedName

Keyer retrieves a set of NamespacedNames referring to the reconciliation targets from the object metadata.

type NamespacedOpts added in v0.3.2

type NamespacedOpts struct {
	LocalNamespace  string
	RemoteNamespace string

	LocalClient      kubernetes.Interface
	RemoteClient     kubernetes.Interface
	LocalLiqoClient  liqoclient.Interface
	RemoteLiqoClient liqoclient.Interface

	LocalFactory      informers.SharedInformerFactory
	RemoteFactory     informers.SharedInformerFactory
	LocalLiqoFactory  liqoinformers.SharedInformerFactory
	RemoteLiqoFactory liqoinformers.SharedInformerFactory

	EventBroadcaster record.EventBroadcaster

	Ready          func() bool
	HandlerFactory func(Keyer, ...EventFilter) cache.ResourceEventHandler
}

NamespacedOpts is a structure grouping the parameters to start a NamespacedReflector.

func NewNamespaced added in v0.3.2

func NewNamespaced() *NamespacedOpts

NewNamespaced returns a new NamespacedOpts object.

func (*NamespacedOpts) WithEventBroadcaster added in v0.3.2

func (ro *NamespacedOpts) WithEventBroadcaster(broadcaster record.EventBroadcaster) *NamespacedOpts

WithEventBroadcaster configures the event broadcaster of the NamespacedOpts.

func (*NamespacedOpts) WithHandlerFactory added in v0.3.2

func (ro *NamespacedOpts) WithHandlerFactory(handler func(Keyer, ...EventFilter) cache.ResourceEventHandler) *NamespacedOpts

WithHandlerFactory configures the handler factory of the NamespacedOpts.

func (*NamespacedOpts) WithLiqoLocal added in v0.3.2

WithLiqoLocal configures the local liqo client and informer factory parameters of the NamespacedOpts.

func (*NamespacedOpts) WithLiqoRemote added in v0.3.2

WithLiqoRemote configures the remote liqo client and informer factory parameters of the NamespacedOpts.

func (*NamespacedOpts) WithLocal added in v0.3.2

func (ro *NamespacedOpts) WithLocal(namespace string, client kubernetes.Interface, factory informers.SharedInformerFactory) *NamespacedOpts

WithLocal configures the local parameters of the NamespacedOpts.

func (*NamespacedOpts) WithReadinessFunc added in v0.3.2

func (ro *NamespacedOpts) WithReadinessFunc(ready func() bool) *NamespacedOpts

WithReadinessFunc configures the readiness function of the NamespacedOpts.

func (*NamespacedOpts) WithRemote added in v0.3.2

func (ro *NamespacedOpts) WithRemote(namespace string, client kubernetes.Interface, factory informers.SharedInformerFactory) *NamespacedOpts

WithRemote configures the remote parameters of the NamespacedOpts.

type ReflectorOpts

type ReflectorOpts struct {
	LocalClient      kubernetes.Interface
	LocalPodInformer corev1informers.PodInformer
	EventBroadcaster record.EventBroadcaster

	HandlerFactory func(Keyer, ...EventFilter) cache.ResourceEventHandler

	Ready func() bool
}

ReflectorOpts is a structure grouping the parameters to start a Reflector.

func New

New returns a new ReflectorOpts object.

func (*ReflectorOpts) WithEventBroadcaster added in v0.5.0

func (ro *ReflectorOpts) WithEventBroadcaster(broadcaster record.EventBroadcaster) *ReflectorOpts

WithEventBroadcaster configures the event broadcaster of the NamespacedOpts.

func (*ReflectorOpts) WithHandlerFactory

func (ro *ReflectorOpts) WithHandlerFactory(handler func(Keyer, ...EventFilter) cache.ResourceEventHandler) *ReflectorOpts

WithHandlerFactory configures the handler factory of the ReflectorOpts.

func (*ReflectorOpts) WithReadinessFunc added in v0.3.2

func (ro *ReflectorOpts) WithReadinessFunc(ready func() bool) *ReflectorOpts

WithReadinessFunc configures the readiness function of the ReflectorOpts.

Jump to

Keyboard shortcuts

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