hook

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

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

func NewHook

func NewHook(config *pkg.HookConfig, f pkg.ReconcileFunc) *Hook

NewHook creates a new go hook

func (*Hook) Execute

func (h *Hook) Execute(ctx context.Context, req HookRequest) (*HookResult, error)

func (*Hook) GetConfig

func (h *Hook) GetConfig() *pkg.HookConfig

func (*Hook) GetName

func (h *Hook) GetName() string

func (*Hook) GetPath

func (h *Hook) GetPath() string

func (*Hook) Run

func (h *Hook) Run(ctx context.Context, input *pkg.HookInput) error

Run start ReconcileFunc

func (*Hook) SetLogger

func (h *Hook) SetLogger(logger *log.Logger) *Hook

func (*Hook) SetMetadata

func (h *Hook) SetMetadata(m *pkg.HookMetadata) *Hook

type HookRequest

type HookRequest interface {
	GetValues() (map[string]any, error)
	GetConfigValues() (map[string]any, error)
	GetBindingContexts() ([]bindingcontext.BindingContext, error)
	GetDependencyContainer() pkg.DependencyContainer
}

type HookResult

type HookResult struct {
	Patches map[utils.ValuesPatchType]pkg.OutputPatchableValuesCollector

	ObjectPatcherOperations pkg.OutputPatchCollector
	Metrics                 pkg.OutputMetricsCollector
}

HookResult returns result of a hook execution

Jump to

Keyboard shortcuts

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