Documentation
¶
Index ¶
- func NewDispatcher(ctx context.Context, config types.ConfigManager, logger types.Logger, ...) (types.Dispatcher, error)
- func NewWebSocketBroker(ctx context.Context, logger types.Logger, config *types.BrokerConfig, ...) (types.ActionBroker, error)
- func RegisterActionBroker(actionBrokerName string, creator types.ActionBrokerCreator)
- type BrokerState
- type Dispatcher
- func (d *Dispatcher) IsRunning() bool
- func (d *Dispatcher) Publish(action string, payload interface{}) error
- func (d *Dispatcher) Start() error
- func (d *Dispatcher) Stop() error
- func (d *Dispatcher) Subscribe(action string, handler types.ActionHandler) error
- func (d *Dispatcher) Unsubscribe(action string) error
- type State
- type WebSocketBroker
- func (w *WebSocketBroker) IsRunning() bool
- func (w *WebSocketBroker) Publish(action string, payload interface{}) error
- func (w *WebSocketBroker) RegisterRoutes(_ types.HTTPRouter)
- func (w *WebSocketBroker) Start() error
- func (w *WebSocketBroker) Stop() error
- func (w *WebSocketBroker) Subscribe(action string, handler types.ActionHandler) error
- func (w *WebSocketBroker) Unsubscribe(action string) error
- type WebSocketConfig
- type Webhook
- type WebhookCreateRequest
- type WebhookListResponse
- type WebhookManager
- type WebhookResponse
- type WebhookState
- type WebhookUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
func NewDispatcher( ctx context.Context, config types.ConfigManager, logger types.Logger, router types.HTTPRouter, metrics types.MetricsManager, health types.HealthManager, clientManager types.ClientManager, ) (types.Dispatcher, error)
func NewWebSocketBroker ¶
func NewWebSocketBroker(ctx context.Context, logger types.Logger, config *types.BrokerConfig, health types.HealthManager) (types.ActionBroker, error)
func RegisterActionBroker ¶
func RegisterActionBroker(actionBrokerName string, creator types.ActionBrokerCreator)
Types ¶
type BrokerState ¶
type BrokerState int32
const ( BrokerStateStopped BrokerState = iota BrokerStateStarting BrokerStateRunning BrokerStateStopping BrokerStateReconnecting )
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func (*Dispatcher) IsRunning ¶
func (d *Dispatcher) IsRunning() bool
func (*Dispatcher) Publish ¶
func (d *Dispatcher) Publish(action string, payload interface{}) error
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start() error
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop() error
func (*Dispatcher) Subscribe ¶
func (d *Dispatcher) Subscribe(action string, handler types.ActionHandler) error
func (*Dispatcher) Unsubscribe ¶
func (d *Dispatcher) Unsubscribe(action string) error
type WebSocketBroker ¶
type WebSocketBroker struct {
// contains filtered or unexported fields
}
func (*WebSocketBroker) IsRunning ¶
func (w *WebSocketBroker) IsRunning() bool
func (*WebSocketBroker) Publish ¶
func (w *WebSocketBroker) Publish(action string, payload interface{}) error
func (*WebSocketBroker) RegisterRoutes ¶
func (w *WebSocketBroker) RegisterRoutes(_ types.HTTPRouter)
func (*WebSocketBroker) Start ¶
func (w *WebSocketBroker) Start() error
func (*WebSocketBroker) Stop ¶
func (w *WebSocketBroker) Stop() error
func (*WebSocketBroker) Subscribe ¶
func (w *WebSocketBroker) Subscribe(action string, handler types.ActionHandler) error
func (*WebSocketBroker) Unsubscribe ¶
func (w *WebSocketBroker) Unsubscribe(action string) error
type WebSocketConfig ¶
type Webhook ¶
type Webhook struct {
ID string `json:"id" db:"id"`
Event string `json:"event" db:"event"`
URL string `json:"url" db:"url"`
Headers map[string]string `json:"headers" db:"headers"`
Secret string `json:"secret" db:"secret"`
Enabled bool `json:"enabled" db:"enabled"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
type WebhookCreateRequest ¶
type WebhookListResponse ¶
type WebhookManager ¶
type WebhookManager struct {
// contains filtered or unexported fields
}
func NewWebhookManager ¶
func NewWebhookManager(ctx context.Context, logger types.Logger, metrics types.MetricsManager) (*WebhookManager, error)
func (*WebhookManager) IsRunning ¶
func (wm *WebhookManager) IsRunning() bool
func (*WebhookManager) Start ¶
func (wm *WebhookManager) Start() error
func (*WebhookManager) Stop ¶
func (wm *WebhookManager) Stop() error
type WebhookResponse ¶
type WebhookState ¶
type WebhookState int32
const ( WebhookStateStopped WebhookState = iota WebhookStateStarting WebhookStateRunning WebhookStateStopping )
Click to show internal directories.
Click to hide internal directories.