drivers

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Deploy(context.Context, *entities.Driver) error
	Expose(context.Context, *entities.Driver) error
	Update(context.Context, *entities.Driver) error
	Delete(context.Context, *entities.Driver) error
}

Backend defines the event driver backend interface

func NewK8sBackend

func NewK8sBackend(secretsClient client.SecretsClient, config ConfigOpts) (Backend, error)

NewK8sBackend creates a new K8s backend driver

type Causer added in v0.1.17

type Causer interface {
	Cause() error
}

Causer defines interface for eventdriver error

type ConfigOpts

type ConfigOpts struct {
	DriverImage     string
	SidecarImage    string
	TransportType   string
	RabbitMQURL     string
	KafkaBrokers    []string
	Tracer          string
	K8sConfig       string
	DriverNamespace string
	Host            string
}

ConfigOpts configures driver Handlers

type EntityHandler

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

EntityHandler handles driver entity operations

func NewEntityHandler

func NewEntityHandler(store entitystore.EntityStore, backend Backend) *EntityHandler

NewEntityHandler creates new instance of EntityHandler

func (*EntityHandler) Add

func (h *EntityHandler) Add(ctx context.Context, obj entitystore.Entity) (err error)

Add adds new driver to the store, and executes its deployment.

func (*EntityHandler) Delete

func (h *EntityHandler) Delete(ctx context.Context, obj entitystore.Entity) error

Delete deletes the driver from the backend

func (*EntityHandler) Error

func (h *EntityHandler) Error(ctx context.Context, obj entitystore.Entity) error

Error handles error state

func (*EntityHandler) Sync

func (h *EntityHandler) Sync(ctx context.Context, resyncPeriod time.Duration) ([]entitystore.Entity, error)

Sync Executes sync loop

func (*EntityHandler) Type

func (h *EntityHandler) Type() reflect.Type

Type returns Entity Handler type

func (*EntityHandler) Update

func (h *EntityHandler) Update(ctx context.Context, obj entitystore.Entity) (err error)

Update updates the driver by updating the deployment

type EventdriverErrorDeploymentAlreadyExists added in v0.1.17

type EventdriverErrorDeploymentAlreadyExists struct {
	Err error `json:"err"`
}

EventdriverErrorDeploymentAlreadyExists defines deployment already exists error for event driver

func (*EventdriverErrorDeploymentAlreadyExists) Cause added in v0.1.17

Cause returns the underlying cause error

func (*EventdriverErrorDeploymentAlreadyExists) Error added in v0.1.17

type EventdriverErrorDeploymentNotAvaialble added in v0.1.17

type EventdriverErrorDeploymentNotAvaialble struct {
	Err error `json:"err"`
}

EventdriverErrorDeploymentNotAvaialble defines deployment not available error for event driver

func (*EventdriverErrorDeploymentNotAvaialble) Cause added in v0.1.17

Cause returns the underlying cause error

func (*EventdriverErrorDeploymentNotAvaialble) Error added in v0.1.17

type EventdriverErrorDeploymentNotFound added in v0.1.17

type EventdriverErrorDeploymentNotFound struct {
	Err error `json:"err"`
}

EventdriverErrorDeploymentNotFound defines deployment not found error for event driver

func (*EventdriverErrorDeploymentNotFound) Cause added in v0.1.17

Cause returns the underlying cause error

func (*EventdriverErrorDeploymentNotFound) Error added in v0.1.17

type EventdriverErrorIngressAlreadyExists added in v0.1.19

type EventdriverErrorIngressAlreadyExists struct {
	Err error `json:"err"`
}

EventdriverErrorIngressAlreadyExists defines ingress already exists error for event driver

func (*EventdriverErrorIngressAlreadyExists) Cause added in v0.1.19

Cause returns the underlying cause error

func (*EventdriverErrorIngressAlreadyExists) Error added in v0.1.19

type EventdriverErrorServiceAlreadyExists added in v0.1.19

type EventdriverErrorServiceAlreadyExists struct {
	Err error `json:"err"`
}

EventdriverErrorServiceAlreadyExists defines service already exists error for event driver

func (*EventdriverErrorServiceAlreadyExists) Cause added in v0.1.19

Cause returns the underlying cause error

func (*EventdriverErrorServiceAlreadyExists) Error added in v0.1.19

type EventdriverErrorUnknown added in v0.1.17

type EventdriverErrorUnknown struct {
	Err error `json:"err"`
}

EventdriverErrorUnknown defines unknonwn error for event driver

func (*EventdriverErrorUnknown) Cause added in v0.1.17

func (err *EventdriverErrorUnknown) Cause() error

Cause returns the underlying cause error

func (*EventdriverErrorUnknown) Error added in v0.1.17

func (err *EventdriverErrorUnknown) Error() string

type Handlers

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

Handlers is a base struct for event manager drivers API handlers.

func NewHandlers

func NewHandlers(store entitystore.EntityStore, watcher controller.Watcher, secretsClient client.SecretsClient, config ConfigOpts) *Handlers

NewHandlers Creates new instance of driver handlers

func (*Handlers) ConfigureHandlers

func (h *Handlers) ConfigureHandlers(api middleware.RoutableAPI)

ConfigureHandlers configures API handlers for driver endpoints

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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