controllers

package
v0.0.0-...-832932f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerConfig

type ControllerConfig struct {
	Source   string
	Handlers map[api.EventType][]ControllerHandlerFunc
}

type ControllerHandlerContextKey

type ControllerHandlerContextKey string
const EventID ControllerHandlerContextKey = "event"
const StatusEventID ControllerHandlerContextKey = "status_event"

type ControllerHandlerFunc

type ControllerHandlerFunc func(ctx context.Context, id string) error

type KindControllerManager

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

func NewKindControllerManager

func NewKindControllerManager(lockFactory db.LockFactory, events services.EventService) *KindControllerManager

func (*KindControllerManager) Add

func (km *KindControllerManager) Add(config *ControllerConfig)

func (*KindControllerManager) AddEvent

func (km *KindControllerManager) AddEvent(id string)

func (*KindControllerManager) Run

func (km *KindControllerManager) Run(stopCh <-chan struct{})

type StatusController

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

func NewStatusController

func NewStatusController(statusEvents services.StatusEventService) *StatusController

func (*StatusController) Add

func (sc *StatusController) Add(handlers map[api.StatusEventType][]StatusHandlerFunc)

func (*StatusController) AddStatusEvent

func (sc *StatusController) AddStatusEvent(id string)

AddStatusEvent adds a status event to the queue to be processed.

func (*StatusController) Run

func (sc *StatusController) Run(stopCh <-chan struct{})

type StatusHandlerFunc

type StatusHandlerFunc func(ctx context.Context, eventID, sourceID string) error

Jump to

Keyboard shortcuts

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