Documentation
¶
Index ¶
- type Hook
- func (h *Hook) Execute(ctx context.Context, req HookRequest) (*HookResult, error)
- func (h *Hook) GetConfig() *pkg.HookConfig
- func (h *Hook) GetName() string
- func (h *Hook) GetPath() string
- func (h *Hook) Run(ctx context.Context, input *pkg.HookInput) error
- func (h *Hook) SetLogger(logger *log.Logger) *Hook
- func (h *Hook) SetMetadata(m *pkg.HookMetadata) *Hook
- type HookRequest
- type HookResult
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) 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
Click to show internal directories.
Click to hide internal directories.