Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoPartner means there is no configured partner for this route ErrNoPartner = errors.New("no partner for this route") )
Functions ¶
This section is empty.
Types ¶
type P ¶
type P interface { // Precache is called by the precacher binary and saves raw bytes of // response into redis. Doing precache prevents clients from hammering // partner serves and also ensures our own responses are fast. // The precacher will call this function for every valid // agency / route / direction combo that returns a partner with // Find(). Precache(agencyID, routeID string, directionID int) error // Live reads the data saved into redis by Precache, parses it and // returns any Departure and/or Vehicle info that can be appended // to the response. Live(agencyID, routeID, stopID string, directionID int) ([]*models.Departure, []models.Vehicle, error) IsLive() bool }
P is an interface that can pull live info from partners
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package nyct_subway is a generated protocol buffer package.
|
Package nyct_subway is a generated protocol buffer package. |
Package transit_realtime is a generated protocol buffer package.
|
Package transit_realtime is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.