controllercontext

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStoreNotRegistered = errors.New("store not registered")
)

Functions

This section is empty.

Types

type ActiveJobStore

type ActiveJobStore interface {
	CountActiveJobsForConfig(rjc *execution.JobConfig) int64
	CheckAndAdd(rjc *execution.JobConfig, oldCount int64) (success bool)
	Delete(rjc *execution.JobConfig)
}

type Clientsets

type Clientsets interface {
	Kubernetes() kubernetes.Interface
	Furiko() furiko.Interface
}

func SetUpClientsets

func SetUpClientsets(cfg *rest.Config) (Clientsets, error)

type Configs

func SetUpConfigManager

func SetUpConfigManager(cfg *configv1alpha1.BootstrapConfigSpec, client kubernetes.Interface) Configs

SetUpConfigManager sets up the ConfigManager and returns a composed Configs interface.

type ConfigsMap added in v0.1.0

type ConfigsMap = map[configv1alpha1.ConfigName]runtime.Object

ConfigsMap is a map of ConfigName to Config object.

type Context

type Context interface {
	Start(ctx context.Context) error
	Clientsets() Clientsets
	Configs() Configs
	Stores() Stores
	Informers() Informers
}

Context is a shared controller context that can be safely shared between controllers.

func NewForConfig

func NewForConfig(cfg *rest.Config, ctrlConfig *configv1alpha1.BootstrapConfigSpec) (Context, error)

NewForConfig prepares a new Context from a kubeconfig and controller manager config spec.

type ContextConfigs

type ContextConfigs struct {
	*configloader.ConfigManager
}

func NewContextConfigs

func NewContextConfigs(mgr *configloader.ConfigManager) *ContextConfigs

func (*ContextConfigs) AllConfigs

AllConfigs returns a map of all configs.

func (*ContextConfigs) Cron added in v0.1.0

Cron returns the cron dynamic configuration.

func (*ContextConfigs) JobConfigs added in v0.1.0

JobConfigs returns the job config dynamic configuration.

func (*ContextConfigs) Jobs added in v0.1.0

Jobs returns the job dynamic configuration.

type ContextStores

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

func NewContextStores

func NewContextStores() *ContextStores

func (*ContextStores) ActiveJobStore

func (c *ContextStores) ActiveJobStore() (ActiveJobStore, error)

ActiveJobStore returns the active job store.

func (*ContextStores) Register

func (c *ContextStores) Register(store Store)

Register a new Store.

type Informers

type Informers interface {
	Start(ctx context.Context) error
	Kubernetes() kubernetes.SharedInformerFactory
	Furiko() furiko.SharedInformerFactory
}

func SetUpInformers

func SetUpInformers(clientsets Clientsets, cfg *configv1alpha1.BootstrapConfigSpec) Informers

type Store

type Store interface {
	Name() string
}

type Stores

type Stores interface {
	Register(store Store)
	ActiveJobStore() (ActiveJobStore, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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