Documentation ¶
Index ¶
- 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 Handlers
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityHandler ¶
type EntityHandler struct {
// contains filtered or unexported fields
}
EntityHandler handles Subscription entity operations
func NewEntityHandler ¶
func NewEntityHandler(store entitystore.EntityStore, manager Manager) *EntityHandler
NewEntityHandler returns new instance of EntityHandler
func (*EntityHandler) Add ¶
func (h *EntityHandler) Add(ctx context.Context, obj entitystore.Entity) (err error)
Add handles adding new subscription entity
func (*EntityHandler) Delete ¶
func (h *EntityHandler) Delete(ctx context.Context, obj entitystore.Entity) error
Delete handles subscription entity deletion
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 is responsible for syncing the state of active subscriptions and their entities
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 API handlers.
func NewHandlers ¶
func NewHandlers(store entitystore.EntityStore, watcher controller.Watcher) *Handlers
NewHandlers Creates new instance of subscription handlers
func (*Handlers) ConfigureHandlers ¶
func (h *Handlers) ConfigureHandlers(api middleware.RoutableAPI)
ConfigureHandlers configures API handlers for Subscription endpoints
type Manager ¶
type Manager interface { Run(context.Context, []*entities.Subscription) error Create(context.Context, *entities.Subscription) error Update(context.Context, *entities.Subscription) error Delete(context.Context, *entities.Subscription) error }
Manager defines the subscription manager interface
func NewManager ¶
NewManager creates a new subscription manager
Click to show internal directories.
Click to hide internal directories.