manager

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerManager

type ControllerManager struct {
	// contains filtered or unexported fields
}

func NewControllerManager

func NewControllerManager(rc *rest.Config, storageFactory registry.SharedStorageFactory, cmdDelivery service.CmdDelivery, terminationChan *chan struct{}, setupFunc SetupFunc) (*ControllerManager, error)

func (*ControllerManager) AddClusterClientSet

func (s *ControllerManager) AddClusterClientSet(cluster string, client client.Client)

func (*ControllerManager) AddRunnable

func (s *ControllerManager) AddRunnable(run Runnable)

func (*ControllerManager) AddWorkerLoop

func (s *ControllerManager) AddWorkerLoop(fn LoopFunc, period time.Duration)

func (*ControllerManager) Close

func (s *ControllerManager) Close()

func (*ControllerManager) GetClusterClientSet

func (s *ControllerManager) GetClusterClientSet(cluster string) (client.Client, bool)

func (*ControllerManager) GetCmdDelivery

func (s *ControllerManager) GetCmdDelivery() service.CmdDelivery

func (*ControllerManager) GetLogger

func (s *ControllerManager) GetLogger() logger.Logging

func (*ControllerManager) PrepareRun

func (s *ControllerManager) PrepareRun(stopCh <-chan struct{}) error

func (*ControllerManager) RemoveClusterClientSet

func (s *ControllerManager) RemoveClusterClientSet(cluster string)

func (*ControllerManager) Run

func (s *ControllerManager) Run(stopCh <-chan struct{}) error

type LoopFunc

type LoopFunc func()

type Manager

type Manager interface {
	// ClusterClientWriter() cluster.OperatorWriter
	// OperationClient() operation.Writer
	AddRunnable(run Runnable)
	AddWorkerLoop(fn LoopFunc, period time.Duration)
	GetLogger() logger.Logging
	GetClusterClientSet(cluster string) (client.Client, bool)
	AddClusterClientSet(cluster string, client client.Client)
	RemoveClusterClientSet(cluster string)
	GetCmdDelivery() service.CmdDelivery
}

type Runnable

type Runnable interface {
	// Start starts running the component.  The component will stop running
	// when the context is closed. Start blocks until the context is closed or
	// an error occurs.
	Start(context.Context) error
}

Runnable allows a component to be started. It's very important that Start blocks until it's done running.

type RunnableFunc

type RunnableFunc func(context.Context) error

RunnableFunc implements Runnable using a function. It's very important that the given function block until it's done running.

func (RunnableFunc) Start

func (r RunnableFunc) Start(ctx context.Context) error

Start implements Runnable.

type SetupFunc

type SetupFunc func(mgr Manager, informerFactory informers.SharedInformerFactory, storageFactory registry.SharedStorageFactory) error

Jump to

Keyboard shortcuts

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