Versions in this module Expand all Collapse all v1 v1.6.1 Jul 9, 2019 Changes in this version + const SessionClaimsKey + const SessionProfileKey + const SessionRolesKey + const SessionRoomKey + const SessionUsernameKey + const SessionWorkspacesKey + func ClearSession(session *melody.Session) + func Marshal(m Message) []byte + func NewErrorMessage(e error) []byte + func NewErrorMessageString(e string) []byte + func UpdateSessionFromClaims(session *melody.Session, claims claim.Claims, pool *views.ClientsPool) + type ChatHandler struct + Pool *views.ClientsPool + Websocket *melody.Melody + func NewChatHandler(serviceCtx context.Context) *ChatHandler + func (c *ChatHandler) AppendUserToRoom(room *chat.ChatRoom, userName string) + func (c *ChatHandler) BroadcastChatMessage(ctx context.Context, msg *chat.ChatEvent) error + func (c *ChatHandler) FindOrCreateRoom(ctx context.Context, room *chat.ChatRoom, createIfNotExists bool) (*chat.ChatRoom, error) + func (c *ChatHandler) InitHandlers(serviceCtx context.Context) + func (c *ChatHandler) RemoveUserFromRoom(room *chat.ChatRoom, userName string) + type ChatMessage struct + Payload string + RoomType chat.RoomType + Type ChatMessageType + type ChatMessageType string + const JoinRoom + const LeaveRoom + const PostMessage + type Message struct + Error string + JWT string + Type MessageType + type MessageType string + const MsgError + const MsgSubscribe + const MsgUnsubscribe + type NodeChangeEventWithInfo struct + type NodeEventsBatcher struct + func NewEventsBatcher(timeout time.Duration, uuid string, out chan *NodeChangeEventWithInfo, ...) *NodeEventsBatcher + func (n *NodeEventsBatcher) Flush() + type WebsocketHandler struct + EventRouter *views.RouterEventFilter + Websocket *melody.Melody + func NewWebSocketHandler(serviceCtx context.Context) *WebsocketHandler + func (w *WebsocketHandler) BroadcastActivityEvent(ctx context.Context, event *activity.PostActivityEvent) error + func (w *WebsocketHandler) BroadcastIDMChangeEvent(ctx context.Context, event *idm.ChangeEvent) error + func (w *WebsocketHandler) BroadcastNodeChangeEvent(ctx context.Context, event *NodeChangeEventWithInfo) error + func (w *WebsocketHandler) BroadcastTaskChangeEvent(ctx context.Context, event *jobs.TaskChangeEvent) error + func (w *WebsocketHandler) HandleNodeChangeEvent(ctx context.Context, event *tree.NodeChangeEvent) error + func (w *WebsocketHandler) InitHandlers(serviceCtx context.Context) Incompatible versions in this module v2.0.6+incompatible Apr 23, 2020