Documentation ¶
Overview ¶
Package options implements the options to configure the reflection.
Index ¶
- type Keyer
- type NamespacedOpts
- func (ro *NamespacedOpts) WithHandlerFactory(handler func(Keyer) 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 ¶
This section is empty.
Types ¶
type Keyer ¶
type Keyer func(metadata metav1.Object) types.NamespacedName
Keyer retrieves a NamespacedName referring to the reconciliation target 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 Ready func() bool HandlerFactory func(Keyer) 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) WithHandlerFactory ¶ added in v0.3.2
func (ro *NamespacedOpts) WithHandlerFactory(handler func(Keyer) 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 HandlerFactory func(Keyer) cache.ResourceEventHandler }
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) WithHandlerFactory ¶
func (ro *ReflectorOpts) WithHandlerFactory(handler func(Keyer) cache.ResourceEventHandler) *ReflectorOpts
WithHandlerFactory configures the handler factory of the ReflectorOpts.