resource

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldSelector

func FieldSelector(fieldSelectors map[string]string) (fields.Selector, error)

FieldSelector returns field selector for resource filtering

func LabelReq

func LabelReq(key, value string) (*labels.Requirement, error)

LabelReq returns label requirements

func LabelSelector

func LabelSelector(resourceLabels map[string]string) (labels.Selector, error)

LabelSelector returns label selector for resource filtering

Types

type EventListener

type EventListener struct {
	// Logger to log stuff
	Logger *logrus.Logger
	// K8RestConfig is kubernetes cluster config
	K8RestConfig *rest.Config
}

EventListener implements Eventing

func (*EventListener) StartEventSource

func (listener *EventListener) StartEventSource(eventSource *gateways.EventSource, eventStream gateways.Eventing_StartEventSourceServer) error

StartEventSource starts an event source

func (*EventListener) ValidateEventSource

func (listener *EventListener) ValidateEventSource(ctx context.Context, eventSource *gateways.EventSource) (*gateways.ValidEventSource, error)

ValidateEventSource validates a resource event source

type InformerEvent

type InformerEvent struct {
	Obj    interface{}
	OldObj interface{}
	Type   v1alpha1.ResourceEventType
}

InformerEvent holds event generated from resource state change

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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