Documentation
¶
Index ¶
- Constants
- func ConvertPositionUpdateToJSON(update *proto.PositionUpdate) ([]byte, error)
- func ConvertPositionsToJSON(updates []*proto.PositionUpdate) ([]byte, error)
- type MsgPayload
- type PositionMessage
- type WsHub
- func (h *WsHub) AddConnection(ctx context.Context, userID string, conn *websocket.Conn) error
- func (h *WsHub) BroadcastMessage(ctx context.Context, message []byte) error
- func (h *WsHub) RemoveConnection(ctx context.Context, userID string, conn *websocket.Conn)
- func (h *WsHub) SendMessageToUser(ctx context.Context, userID string, message []byte) error
Constants ¶
View Source
const ( RedisChannel = "ws-broadcast" UserNodeMapKey = "user_node_map" BroadcastChannel = "broadcast-all" )
Variables ¶
This section is empty.
Functions ¶
func ConvertPositionUpdateToJSON ¶
func ConvertPositionUpdateToJSON(update *proto.PositionUpdate) ([]byte, error)
func ConvertPositionsToJSON ¶
func ConvertPositionsToJSON(updates []*proto.PositionUpdate) ([]byte, error)
Types ¶
type MsgPayload ¶
type PositionMessage ¶
type WsHub ¶
type WsHub struct {
// contains filtered or unexported fields
}
func (*WsHub) AddConnection ¶
func (*WsHub) BroadcastMessage ¶
func (*WsHub) RemoveConnection ¶
Click to show internal directories.
Click to hide internal directories.