Documentation ¶
Index ¶
- type StandardK8sTrigger
- func (k8sTrigger *StandardK8sTrigger) ApplyPolicy(ctx context.Context, resource interface{}) error
- func (k8sTrigger *StandardK8sTrigger) ApplyResourceParameters(events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error)
- func (k8sTrigger *StandardK8sTrigger) Execute(ctx context.Context, events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error)
- func (k8sTrigger *StandardK8sTrigger) FetchResource(ctx context.Context) (interface{}, error)
- func (k8sTrigger *StandardK8sTrigger) GetTriggerType() v1alpha1.TriggerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StandardK8sTrigger ¶
type StandardK8sTrigger struct { // K8sClient is kubernetes client K8sClient kubernetes.Interface // Dynamic client is Kubernetes dymalic client DynamicClient dynamic.Interface // Sensor object Sensor *v1alpha1.Sensor // Trigger definition Trigger *v1alpha1.Trigger // logger to log stuff Logger *zap.SugaredLogger // contains filtered or unexported fields }
StandardK8STrigger implements Trigger interface for standard Kubernetes resources
func NewStandardK8sTrigger ¶
func NewStandardK8sTrigger(k8sClient kubernetes.Interface, dynamicClient dynamic.Interface, sensor *v1alpha1.Sensor, trigger *v1alpha1.Trigger, logger *zap.SugaredLogger) *StandardK8sTrigger
NewStandardK8sTrigger returns a new StandardK8STrigger
func (*StandardK8sTrigger) ApplyPolicy ¶
func (k8sTrigger *StandardK8sTrigger) ApplyPolicy(ctx context.Context, resource interface{}) error
ApplyPolicy applies the policy on the trigger
func (*StandardK8sTrigger) ApplyResourceParameters ¶
func (k8sTrigger *StandardK8sTrigger) ApplyResourceParameters(events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error)
ApplyResourceParameters applies parameters to the trigger resource
func (*StandardK8sTrigger) Execute ¶
func (k8sTrigger *StandardK8sTrigger) Execute(ctx context.Context, events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error)
Execute executes the trigger
func (*StandardK8sTrigger) FetchResource ¶
func (k8sTrigger *StandardK8sTrigger) FetchResource(ctx context.Context) (interface{}, error)
FetchResource fetches the trigger resource from external source
func (*StandardK8sTrigger) GetTriggerType ¶
func (k8sTrigger *StandardK8sTrigger) GetTriggerType() v1alpha1.TriggerType
GetTriggerType returns the type of the trigger
Click to show internal directories.
Click to hide internal directories.