Documentation ¶
Index ¶
- type Backend
- type Causer
- type ConfigOpts
- type EntityHandler
- func (h *EntityHandler) Add(ctx context.Context, obj entitystore.Entity) (err error)
- func (h *EntityHandler) Delete(ctx context.Context, obj entitystore.Entity) error
- func (h *EntityHandler) Error(ctx context.Context, obj entitystore.Entity) error
- func (h *EntityHandler) Sync(ctx context.Context, resyncPeriod time.Duration) ([]entitystore.Entity, error)
- func (h *EntityHandler) Type() reflect.Type
- func (h *EntityHandler) Update(ctx context.Context, obj entitystore.Entity) (err error)
- type EventdriverErrorDeploymentAlreadyExists
- type EventdriverErrorDeploymentNotAvaialble
- type EventdriverErrorDeploymentNotFound
- type EventdriverErrorIngressAlreadyExists
- type EventdriverErrorServiceAlreadyExists
- type EventdriverErrorUnknown
- type Handlers
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
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
func (err *EventdriverErrorDeploymentAlreadyExists) Cause() error
Cause returns the underlying cause error
func (*EventdriverErrorDeploymentAlreadyExists) Error ¶ added in v0.1.17
func (err *EventdriverErrorDeploymentAlreadyExists) Error() string
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
func (err *EventdriverErrorDeploymentNotAvaialble) Cause() error
Cause returns the underlying cause error
func (*EventdriverErrorDeploymentNotAvaialble) Error ¶ added in v0.1.17
func (err *EventdriverErrorDeploymentNotAvaialble) Error() string
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
func (err *EventdriverErrorDeploymentNotFound) Cause() error
Cause returns the underlying cause error
func (*EventdriverErrorDeploymentNotFound) Error ¶ added in v0.1.17
func (err *EventdriverErrorDeploymentNotFound) Error() string
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
func (err *EventdriverErrorIngressAlreadyExists) Cause() error
Cause returns the underlying cause error
func (*EventdriverErrorIngressAlreadyExists) Error ¶ added in v0.1.19
func (err *EventdriverErrorIngressAlreadyExists) Error() string
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
func (err *EventdriverErrorServiceAlreadyExists) Cause() error
Cause returns the underlying cause error
func (*EventdriverErrorServiceAlreadyExists) Error ¶ added in v0.1.19
func (err *EventdriverErrorServiceAlreadyExists) Error() string
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