mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-11 18:13:52 +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
|
||||
}
|
||||
|
||||
// WSServer is a WebSocket server
|
||||
type WSServer struct {
|
||||
upgrader websocket.Upgrader
|
||||
listeners map[string][]*websocket.Conn
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
// NewWSServer creates a new WSServer
|
||||
func NewWSServer() *WSServer {
|
||||
return &WSServer{
|
||||
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 {
|
||||
Action string `json:"action"`
|
||||
BlockID string `json:"blockId"`
|
||||
|
Loading…
Reference in New Issue
Block a user