Documentation ¶
Index ¶
- func SecretStoreClient(secretstoreURL string) *secretsclient.SecretStore
- type Backend
- 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, organizationID string, 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 Handlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecretStoreClient ¶
func SecretStoreClient(secretstoreURL string) *secretsclient.SecretStore
SecretStoreClient returns a client to the secret store
Types ¶
type Backend ¶
type Backend interface { Deploy(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(config ConfigOpts) (Backend, error)
NewK8sBackend creates a new K8s backend driver
type ConfigOpts ¶
type ConfigOpts struct { DriverImage string SidecarImage string TransportType string RabbitMQURL string KafkaBrokers []string Tracer string K8sConfig string DriverNamespace string SecretStoreURL string OrgID 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, organizationID string, 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 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, 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