Documentation ¶
Index ¶
- func SecretStoreClient(secretstoreURL string) *secretsclient.SecretStore
- type Backend
- type ConfigOpts
- type EntityHandler
- func (h *EntityHandler) Add(obj entitystore.Entity) (err error)
- func (h *EntityHandler) Delete(obj entitystore.Entity) error
- func (h *EntityHandler) Error(obj entitystore.Entity) error
- func (h *EntityHandler) Sync(organizationID string, resyncPeriod time.Duration) ([]entitystore.Entity, error)
- func (h *EntityHandler) Type() reflect.Type
- func (h *EntityHandler) Update(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(*entities.Driver) error Update(*entities.Driver) error Delete(*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(obj entitystore.Entity) (err error)
Add adds new driver to the store, and executes its deployment.
func (*EntityHandler) Delete ¶
func (h *EntityHandler) Delete(obj entitystore.Entity) error
Delete deletes the driver from the backend
func (*EntityHandler) Error ¶
func (h *EntityHandler) Error(obj entitystore.Entity) error
Error handles error state
func (*EntityHandler) Sync ¶
func (h *EntityHandler) Sync(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
func (*EntityHandler) Update ¶
func (h *EntityHandler) Update(obj entitystore.Entity) (err error)
Update updates the driver by updating the deployment
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