func NewPacketInjectorClient(w *shttp.WSServer) *PacketInjectorClient { pic := &PacketInjectorClient{ WSServer: w, replyChan: make(map[string]chan *json.RawMessage), } w.AddEventHandler(pic) return pic }
func NewTableClient(w *shttp.WSServer) *TableClient { tc := &TableClient{ WSServer: w, replyChan: make(map[string]chan *json.RawMessage), } w.AddEventHandler(tc) return tc }
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 }