Documentation ¶
Index ¶
- Constants
- type Bus
- func (b *Bus) DumpState() Metrics
- func (b *Bus) Register(queues []string) (chan Event, int64, error)
- func (b *Bus) Send(event, typ string, thing interface{}, queues ...string)
- func (b *Bus) SendError(err error, queues ...string)
- func (b *Bus) SendEvent(queues []string, ev Event)
- func (b *Bus) Unregister(id int64)
- type Event
- type MetricSlot
- type Metrics
Constants ¶
View Source
const ( ErrorEvent = "error" UnlockCoreEvent = "unlock-core" CreateObjectEvent = "create-object" UpdateObjectEvent = "update-object" DeleteObjectEvent = "delete-object" TaskStatusUpdateEvent = "task-status-update" TaskLogUpdateEvent = "task-log-update" TenantInviteEvent = "tenant-invite" TenantBanishEvent = "tenant-banish" HealthUpdateEvent = "health-update" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func (*Bus) Unregister ¶
Unregister causes the bus to stop routing events to the handler with the given ID. The channel returned from the matching call to register is closed. Multiple calls to Unregister with the same id are idempotent.
type MetricSlot ¶
type Metrics ¶
type Metrics struct { Configuration struct { MaxSlots int `json:"max_slots"` Backlog int `json:"backlog"` } `json:"configuration"` Connections struct { Lifetime int64 `json:"lifetime"` Current int64 `json:"current"` Dropped int64 `json:"dropped"` } `json:"connections"` Events map[string]int64 `json:"events"` Messages map[string]int64 `json:"messages"` Slots []MetricSlot `json:"clients"` }
Click to show internal directories.
Click to hide internal directories.