Documentation ¶
Overview ¶
Package options implements the options to configure the reflection.
Index ¶
- func EventFilterCreate(et watch.EventType) bool
- func EventFilterDelete(et watch.EventType) bool
- func EventFilterUpdate(et watch.EventType) bool
- type EventFilter
- type Keyer
- type NamespacedOpts
- func (ro *NamespacedOpts) WithEventBroadcaster(broadcaster record.EventBroadcaster) *NamespacedOpts
- func (ro *NamespacedOpts) WithForgingOpts(opts *forge.ForgingOpts) *NamespacedOpts
- func (ro *NamespacedOpts) WithHandlerFactory(handler func(Keyer, ...EventFilter) cache.ResourceEventHandler) *NamespacedOpts
- func (ro *NamespacedOpts) WithLiqoLocal(client liqoclient.Interface, factory liqoinformers.SharedInformerFactory) *NamespacedOpts
- func (ro *NamespacedOpts) WithLiqoRemote(client liqoclient.Interface, factory liqoinformers.SharedInformerFactory) *NamespacedOpts
- func (ro *NamespacedOpts) WithLocal(namespace string, client kubernetes.Interface, ...) *NamespacedOpts
- func (ro *NamespacedOpts) WithReadinessFunc(ready func() bool) *NamespacedOpts
- func (ro *NamespacedOpts) WithRemote(namespace string, client kubernetes.Interface, ...) *NamespacedOpts
- type ReflectorOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventFilterCreate ¶ added in v0.7.0
EventFilterCreate ignores events of type create.
func EventFilterDelete ¶ added in v0.7.0
EventFilterDelete ignores events of type delete.
func EventFilterUpdate ¶ added in v0.7.0
EventFilterUpdate ignores events of type update.
Types ¶
type EventFilter ¶ added in v0.7.0
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 ForgingOpts *forge.ForgingOpts }
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) WithForgingOpts ¶ added in v0.9.0
func (ro *NamespacedOpts) WithForgingOpts(opts *forge.ForgingOpts) *NamespacedOpts
WithForgingOpts configures the reflection options 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
func (ro *NamespacedOpts) WithLiqoLocal(client liqoclient.Interface, factory liqoinformers.SharedInformerFactory) *NamespacedOpts
WithLiqoLocal configures the local liqo client and informer factory parameters of the NamespacedOpts.
func (*NamespacedOpts) WithLiqoRemote ¶ added in v0.3.2
func (ro *NamespacedOpts) WithLiqoRemote(client liqoclient.Interface, factory liqoinformers.SharedInformerFactory) *NamespacedOpts
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 ¶
func New(client kubernetes.Interface, podInformer corev1informers.PodInformer) *ReflectorOpts
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.