controller

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHookIndexIsNotExists = errors.New("hook index is not exists")
View Source
var ErrNoHooksRegistered = errors.New("no hooks registered")
View Source
var ErrReadinessHookDoesNotExists = errors.New("readiness hook does not exists")

Functions

This section is empty.

Types

type Config

type Config struct {
	ModuleName      string
	HookConfig      *HookConfig
	ReadinessConfig *ReadinessConfig

	LogLevelRaw string
	LogLevel    log.Level
}

func (*Config) GetFileConfig

func (cfg *Config) GetFileConfig() *file.Config

type HookConfig

type HookConfig struct {
	BindingContextPath string
	ValuesPath         string
	ConfigValuesPath   string

	// send to addon operator when config requested
	HookConfigPath string

	MetricsPath          string
	KubernetesPath       string
	ValuesJSONPath       string
	ConfigValuesJSONPath string

	CreateFilesByYourself bool
}

type HookController

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

func NewHookController

func NewHookController(cfg *Config, logger *log.Logger) *HookController

func (*HookController) ListHooksMeta

func (c *HookController) ListHooksMeta() []pkg.HookMetadata

func (*HookController) PrintHookConfigs

func (c *HookController) PrintHookConfigs() error

func (*HookController) RunHook

func (c *HookController) RunHook(ctx context.Context, idx int) error

func (*HookController) RunReadiness

func (c *HookController) RunReadiness(ctx context.Context) error

func (*HookController) WriteHookConfigsInFile

func (c *HookController) WriteHookConfigsInFile() error

type HookSender

type HookSender interface {
	SendMetrics() error
	SendPatches() error
	SendValues() error
	SendConfigValues() error
}

type ReadinessConfig

type ReadinessConfig struct {
	ModuleName        string
	IntervalInSeconds uint8
	ProbeFunc         func(ctx context.Context, input *pkg.HookInput) error
}

Jump to

Keyboard shortcuts

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