func NewServer(a *AlertManager, server *shttp.WSServer) *AlertServer { s := &AlertServer{ AlertManager: a, WSServer: server, clients: make(map[*shttp.WSClient]*alertClient), } server.AddEventHandler(s) return s }
func NewServer(g *Graph, server *shttp.WSServer) *GraphServer { s := &GraphServer{ Graph: g, WSServer: server, } s.Graph.AddEventListener(s) server.AddEventHandler(s) return s }