Documentation ¶
Overview ¶
Package fake implements the reflector interfaces for testing purposes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespacedReflector ¶
type NamespacedReflector struct { Opts options.ReflectorOpts Handled int // contains filtered or unexported fields }
NamespacedReflector implements a fake NamespacedReflector for testing purposes.
func NewNamespacedReflector ¶
func NewNamespacedReflector(opts *options.ReflectorOpts) *NamespacedReflector
NewNamespacedReflector returns a new fake Reflector.
func (*NamespacedReflector) Handle ¶
func (r *NamespacedReflector) Handle(ctx context.Context, name string) error
Handle increments the Handled counter.
func (*NamespacedReflector) Ready ¶
func (r *NamespacedReflector) Ready() bool
Ready returns whether the NamespacedReflector is completely initialized.
func (*NamespacedReflector) SetReady ¶
func (r *NamespacedReflector) SetReady()
SetReady marks the NamespacedReflector as completely initialized.
type Reflector ¶
type Reflector struct { Started bool NamespaceStarted map[string]*options.ReflectorOpts NamespaceStopped map[string]string NamespaceReady map[string]bool }
Reflector implements a fake Reflector for testing purposes.
func (*Reflector) SetNamespaceReady ¶
SetNamespaceReady marks the given namespace as ready.
func (*Reflector) StartNamespace ¶
func (r *Reflector) StartNamespace(opts *options.ReflectorOpts)
StartNamespace marks the given namespace as started, and stores the given options.
func (*Reflector) StopNamespace ¶
StopNamespace marks the given namespace as stopped, and stores the remote namespace name.