Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientRepo ¶
type Event ¶
type Event struct { Type EventType `json:"type"` Payload json.RawMessage `json:"payload"` }
type EventHandler ¶
type EventRouter ¶
type EventRouter interface { Route(event Event, client Client) error Handle(eventType EventType, eventHandler EventHandler) EventRouter Handlers() map[EventType]EventHandler }
type Manager ¶
type Manager interface { Clients() ClientRepo EventRouter() EventRouter WebsocketUpgrader() *websocket.Upgrader AddClient(Client) error RemoveClient(Client) }
Click to show internal directories.
Click to hide internal directories.