standard_k8s

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL