Documentation ¶
Index ¶
- type Cache
- type Finder
- func (f *Finder) AddData(topic string, data []byte) error
- func (f *Finder) FindAlertsForAgency(t *model.Agency, limit *int, active *bool) []*model.Alert
- func (f *Finder) FindAlertsForRoute(t *model.Route, limit *int, active *bool) []*model.Alert
- func (f *Finder) FindAlertsForStop(t *model.Stop, limit *int, active *bool) []*model.Alert
- func (f *Finder) FindAlertsForTrip(t *model.Trip, limit *int, active *bool) []*model.Alert
- func (f *Finder) FindStopTimeUpdate(t *model.Trip, st *model.StopTime) (*model.RTStopTimeUpdate, bool)
- func (f *Finder) FindTrip(t *model.Trip) *pb.TripUpdate
- func (f *Finder) GetAddedTripsForStop(t *model.Stop) []*pb.TripUpdate
- func (f *Finder) GetGtfsTripID(id int) (string, bool)
- func (f *Finder) GetMessage(topic string, topicKey string) (*pb.FeedMessage, bool)
- func (f *Finder) MakeTrip(obj *model.Trip) (*model.Trip, error)
- func (f *Finder) StopTimezone(id int, known string) (*time.Location, bool)
- type LocalCache
- type RedisCache
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { AddFeedMessage(string, *pb.FeedMessage) error AddData(string, []byte) error GetSource(string) (*Source, bool) Close() error }
Cache provides a method for looking up and listening for changed RT data
type Finder ¶
func (*Finder) FindAlertsForAgency ¶
func (*Finder) FindAlertsForRoute ¶
func (*Finder) FindAlertsForStop ¶
func (*Finder) FindAlertsForTrip ¶
func (*Finder) FindStopTimeUpdate ¶
func (*Finder) GetAddedTripsForStop ¶
func (f *Finder) GetAddedTripsForStop(t *model.Stop) []*pb.TripUpdate
TODO: put this method on consumer and wrap, as with GetTrip
func (*Finder) GetMessage ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewLocalCache ¶
func NewLocalCache() *LocalCache
func (*LocalCache) AddFeedMessage ¶
func (f *LocalCache) AddFeedMessage(topic string, rtmsg *pb.FeedMessage) error
func (*LocalCache) Close ¶
func (f *LocalCache) Close() error
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(client *redis.Client) *RedisCache
func (*RedisCache) AddFeedMessage ¶
func (f *RedisCache) AddFeedMessage(topic string, rtmsg *pb.FeedMessage) error
func (*RedisCache) Close ¶
func (f *RedisCache) Close() error
Click to show internal directories.
Click to hide internal directories.