Documentation ¶
Index ¶
- type Manager
- func (mgr *Manager) CleanupThreads(instance client.Object) func()
- func (mgr *Manager) GetChannel() <-chan event.GenericEvent
- func (mgr *Manager) ReconcileThreads(ctx context.Context, instance client.Object, threads []RunnableThread, ...) error
- func (mgr *Manager) RunThread(ctx context.Context, key string, thread RunnableThread, log logr.Logger) error
- func (mgr *Manager) StopThread(key string)
- type RunnableThread
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a struct that holds configuration to manage concurrent RunnableThreads
func (*Manager) CleanupThreads ¶
CleanupThreads returns a function that cleans matching threads when invoked. This is intended for use as a cleanup function in the finalize phase of a controller's reconcile loop.
func (*Manager) GetChannel ¶
func (mgr *Manager) GetChannel() <-chan event.GenericEvent
GetChannel returns the channel through which events can be received from the running thread
func (*Manager) ReconcileThreads ¶
func (mgr *Manager) ReconcileThreads(ctx context.Context, instance client.Object, threads []RunnableThread, log logr.Logger) error
ReconcileThreads ensures that the threads identified by the provided keys are running. prefix() is used to identify which threads belong to each resource.
func (*Manager) RunThread ¶
func (mgr *Manager) RunThread(ctx context.Context, key string, thread RunnableThread, log logr.Logger) error
RunThread runs thread and associates it with a given key so it can later be stopped
func (*Manager) StopThread ¶
StopThread stops the thread identified by the given key