Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserClient ¶
func NewBrowserClient ¶
func NewBrowserClient(c *websocket.Conn) *BrowserClient
NewOverlordClient returns a client connecting to browser. This connection exchanges information between clients and server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetWeb ¶
func (o *Server) GetWeb(w http.ResponseWriter, r *http.Request)
GetWeb returns web frontend
func (*Server) RouteWorker ¶
func (o *Server) RouteWorker(workerClient *WorkerClient)
RouteWorker are all routes server received from worker
type Session ¶
type Session struct { ID string BrowserClient *BrowserClient WorkerClient *WorkerClient ServerID string RoomID string // contains filtered or unexported fields }
Session represents a session connected from the browser to the current server It requires one connection to browser and one connection to the overlord connection to browser is 1-1. connection to overlord is n - 1 Peerconnection can be from other server to ensure better latency
func (*Session) RouteBrowser ¶
func (s *Session) RouteBrowser()
RouteBrowser are all routes server accepts for browser
type WorkerClient ¶
func NewWorkerClient ¶
func NewWorkerClient(c *websocket.Conn, serverID string) *WorkerClient
NewWorkerClient returns a client connecting to worker. This connection exchanges information between workers and server