Documentation ¶
Index ¶
- type StandardK8sTrigger
- func (k8sTrigger *StandardK8sTrigger) ApplyPolicy(resource interface{}) error
- func (k8sTrigger *StandardK8sTrigger) ApplyResourceParameters(sensor *v1alpha1.Sensor, resource interface{}) (interface{}, error)
- func (k8sTrigger *StandardK8sTrigger) Execute(resource interface{}) (interface{}, error)
- func (k8sTrigger *StandardK8sTrigger) FetchResource() (interface{}, error)
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 *logrus.Logger // 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 *logrus.Logger) *StandardK8sTrigger
NewStandardK8sTrigger returns a new StandardK8sTrigger
func (*StandardK8sTrigger) ApplyPolicy ¶
func (k8sTrigger *StandardK8sTrigger) ApplyPolicy(resource interface{}) error
ApplyPolicy applies the policy on the trigger
func (*StandardK8sTrigger) ApplyResourceParameters ¶
func (k8sTrigger *StandardK8sTrigger) ApplyResourceParameters(sensor *v1alpha1.Sensor, resource interface{}) (interface{}, error)
ApplyResourceParameters applies parameters to the trigger resource
func (*StandardK8sTrigger) Execute ¶
func (k8sTrigger *StandardK8sTrigger) Execute(resource interface{}) (interface{}, error)
Execute executes the trigger
func (*StandardK8sTrigger) FetchResource ¶
func (k8sTrigger *StandardK8sTrigger) FetchResource() (interface{}, error)
FetchResource fetches the trigger resource from external source
Click to show internal directories.
Click to hide internal directories.