Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyTransformationConfig

type KeyTransformationConfig struct {
	Action      string `json:"action"`
	Regex       string `json:"regex"`
	Replacement string `json:"replacement"`
}

type ResourceHandlers

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

func NewResourceHandlers

func NewResourceHandlers(logger log.Logger, inf cache.SharedIndexInformer, enqueueFunc func(obj interface{}), keyFunc func(obj interface{}) (string, bool), keyTransformationConfigs []KeyTransformationConfig) (*ResourceHandlers, error)

func (*ResourceHandlers) OnAdd

func (r *ResourceHandlers) OnAdd(obj interface{})

func (*ResourceHandlers) OnDelete

func (r *ResourceHandlers) OnDelete(obj interface{})

func (*ResourceHandlers) OnUpdate

func (r *ResourceHandlers) OnUpdate(old, cur interface{})

type ResourceTriggerConfig

type ResourceTriggerConfig struct {
	Name                     string                    `json:"name"`
	Kind                     string                    `json:"kind"`
	APIVersion               string                    `json:"apiVersion"`
	KeyTransformationConfigs []KeyTransformationConfig `json:"keyTransformations"`
}

type ResourcesTriggerConfig

type ResourcesTriggerConfig struct {
	MainResource string                  `json:"mainResource"`
	Resources    []ResourceTriggerConfig `json:"resources"`
}

type TransformationAction

type TransformationAction = string
const (
	KeyReplace TransformationAction = "replace"
	KeyDrop    TransformationAction = "drop"
	KeyKeep    TransformationAction = "keep"
)

type Trigger

type Trigger struct {
	trigger.ExecutionRegister
	// contains filtered or unexported fields
}

func NewTrigger

func NewTrigger(logger log.Logger, client *client.Client, configFile string) (*Trigger, error)

func (*Trigger) Run

func (p *Trigger) Run(ctx context.Context) error