Documentation
¶
Index ¶
- Variables
- func ConvertKubeEventToBindingContext(kubeEvent KubeEvent, link *KubernetesBindingToMonitorLink) []BindingContext
- type BindingExecutionInfo
- type HookController
- type KubernetesBindingToMonitorLink
- type KubernetesBindingsController
- type ScheduleBindingToCrontabLink
- type ScheduleBindingsController
- type ValidatingBindingToWebhookLink
- type ValidatingBindingsController
Constants ¶
This section is empty.
Variables ¶
View Source
var NewKubernetesBindingsController = func() *kubernetesBindingsController { return &kubernetesBindingsController{ BindingMonitorLinks: make(map[string]*KubernetesBindingToMonitorLink), } }
NewKubernetesHooksController returns an implementation of KubernetesHooksController
View Source
var NewScheduleBindingsController = func() *scheduleBindingsController { return &scheduleBindingsController{ ScheduleLinks: make(map[string]*ScheduleBindingToCrontabLink), } }
NewKubernetesHooksController returns an implementation of KubernetesHooksController
View Source
var NewValidatingBindingsController = func() *validatingBindingsController { return &validatingBindingsController{ ValidatingLinks: make(map[string]*ValidatingBindingToWebhookLink), } }
NewKubernetesHooksController returns an implementation of KubernetesHooksController
Functions ¶
func ConvertKubeEventToBindingContext ¶
func ConvertKubeEventToBindingContext(kubeEvent KubeEvent, link *KubernetesBindingToMonitorLink) []BindingContext
Types ¶
type BindingExecutionInfo ¶
type HookController ¶
type HookController interface {
InitKubernetesBindings([]OnKubernetesEventConfig, kube_events_manager.KubeEventsManager)
InitScheduleBindings([]ScheduleConfig, schedule_manager.ScheduleManager)
InitValidatingBindings([]ValidatingConfig, *validating_webhook.WebhookManager)
CanHandleKubeEvent(kubeEvent KubeEvent) bool
CanHandleScheduleEvent(crontab string) bool
CanHandleValidatingEvent(event ValidatingEvent) bool
// These method should call underlying BindingController to get binding context
// and then add Snapshots to binding context
HandleEnableKubernetesBindings(createTasksFn func(BindingExecutionInfo)) error
HandleKubeEvent(event KubeEvent, createTasksFn func(BindingExecutionInfo))
HandleScheduleEvent(crontab string, createTasksFn func(BindingExecutionInfo))
HandleValidatingEvent(event ValidatingEvent, createTasksFn func(BindingExecutionInfo))
StartMonitors()
StopMonitors()
EnableScheduleBindings()
DisableScheduleBindings()
EnableValidatingBindings()
KubernetesSnapshots() map[string][]ObjectAndFilterResult
UpdateSnapshots([]BindingContext) []BindingContext
}
func NewHookController ¶
func NewHookController() HookController
type KubernetesBindingToMonitorLink ¶
type KubernetesBindingToMonitorLink struct {
BindingName string
MonitorId string
// Useful fields to create a BindingContext
IncludeSnapshots []string
AllowFailure bool
JqFilter string
QueueName string
Group string
WaitForSynchronization bool
}
A link between a hook and a kube monitor TODO replace "Useful fields" with OnKubernetesEventConfig
type KubernetesBindingsController ¶
type KubernetesBindingsController interface {
WithKubernetesBindings([]OnKubernetesEventConfig)
WithKubeEventsManager(kube_events_manager.KubeEventsManager)
EnableKubernetesBindings() ([]BindingExecutionInfo, error)
StartMonitors()
StopMonitors()
CanHandleEvent(kubeEvent KubeEvent) bool
HandleEvent(kubeEvent KubeEvent) BindingExecutionInfo
BindingNames() []string
SnapshotsFrom(bindingNames ...string) map[string][]ObjectAndFilterResult
Snapshots() map[string][]ObjectAndFilterResult
}
KubernetesBindingsController handles kubernetes bindings for one hook.
type ScheduleBindingToCrontabLink ¶
type ScheduleBindingToCrontabLink struct {
BindingName string
Crontab string
// Useful fields to create a BindingContext
IncludeSnapshots []string
AllowFailure bool
QueueName string
Group string
}
A link between a hook and a kube monitor
type ScheduleBindingsController ¶
type ScheduleBindingsController interface {
WithScheduleBindings([]ScheduleConfig)
WithScheduleManager(schedule_manager.ScheduleManager)
EnableScheduleBindings()
DisableScheduleBindings()
CanHandleEvent(crontab string) bool
HandleEvent(crontab string) []BindingExecutionInfo
}
ScheduleBindingsController handles schedule bindings for one hook.
type ValidatingBindingToWebhookLink ¶
type ValidatingBindingToWebhookLink struct {
BindingName string
ConfigurationId string
WebhookId string
// Useful fields to create a BindingContext
IncludeSnapshots []string
Group string
}
A link between a hook and a kube monitor
type ValidatingBindingsController ¶
type ValidatingBindingsController interface {
WithValidatingBindings([]ValidatingConfig)
WithWebhookManager(*validating_webhook.WebhookManager)
EnableValidatingBindings()
DisableValidatingBindings()
CanHandleEvent(event ValidatingEvent) bool
HandleEvent(event ValidatingEvent) BindingExecutionInfo
}
ScheduleBindingsController handles schedule bindings for one hook.
Click to show internal directories.
Click to hide internal directories.