mirror of
https://github.com/mattermost/focalboard.git
synced 2025-05-13 21:37:37 +02:00
Add Go WebSocket method comments
This commit is contained in:
parent
54852cd5f2
commit
ae93fe22ce
@ -42,12 +42,14 @@ func (ws *WSServer) GetListeners(blockID string) []*websocket.Conn {
|
|||||||
return listeners
|
return listeners
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WSServer is a WebSocket server
|
||||||
type WSServer struct {
|
type WSServer struct {
|
||||||
upgrader websocket.Upgrader
|
upgrader websocket.Upgrader
|
||||||
listeners map[string][]*websocket.Conn
|
listeners map[string][]*websocket.Conn
|
||||||
mu sync.RWMutex
|
mu sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewWSServer creates a new WSServer
|
||||||
func NewWSServer() *WSServer {
|
func NewWSServer() *WSServer {
|
||||||
return &WSServer{
|
return &WSServer{
|
||||||
listeners: make(map[string][]*websocket.Conn),
|
listeners: make(map[string][]*websocket.Conn),
|
||||||
@ -59,7 +61,7 @@ func NewWSServer() *WSServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebsocketMsg is send on block changes
|
// WebsocketMsg is sent on block changes
|
||||||
type WebsocketMsg struct {
|
type WebsocketMsg struct {
|
||||||
Action string `json:"action"`
|
Action string `json:"action"`
|
||||||
BlockID string `json:"blockId"`
|
BlockID string `json:"blockId"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user