Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleNewConnection ¶
HandleNewConnection Function
Types ¶
type Client ¶
type Client struct { UUID uuid.UUID Pool *Pool Conn *websocket.Conn Send chan []*gtfs.TripUpdate_StopTimeUpdate StopID string SubwayLine string Config types.Config Fetching bool }
Client struct holds all client related data
func (*Client) ConfigureGenerator ¶
func (client *Client) ConfigureGenerator()
ConfigureGenerator is also probably overkill
func (*Client) ConfigureSort ¶
func (client *Client) ConfigureSort()
ConfigureSort is probably really over kill but this lets you write special parsers/sorters serverside and apply them to multiple clients at once. Eventaully use an enum/constant for the sort configurations/functions. Can probably use this to return custom data types i.e. mixing train times and service alert information.
type Message ¶
type Message struct { Message types.UpcomingTrain //Confusing naming convention Client *Client }
Message Struct
type Pool ¶
type Pool struct { SubwayLine string Clients map[uuid.UUID]*Client Broadcast chan []*gtfs.TripUpdate_StopTimeUpdate Register chan *Client Unregister chan *Client ActiveTrains map[string][]map[uuid.UUID]*Client ActiveTrainChannel chan string CachedStopTimeUpdate map[string][]*gtfs.TripUpdate_StopTimeUpdate Ticker *time.Ticker Done chan bool }
Pool struct holds all pool related data
Click to show internal directories.
Click to hide internal directories.