Documentation ¶
Index ¶
- func Add(delta int)
- func AddTarget(ctx context.Context, link string) error
- func CancelTarget(link string) error
- func CheckNow()
- func Done()
- func RegisterModule(m Module) error
- func RemoveTarget(ctx context.Context, link string) error
- func SnipeTargetAt(ctx context.Context, t Target, at time.Time) error
- func Start(ctx context.Context) error
- func Wait()
- type DisplayRow
- type DisplayTable
- type Module
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterModule ¶
RegisterModule with a hostname note: we do not expect to be called after tracking begins
func RemoveTarget ¶
RemoveTarget from tracking
func SnipeTargetAt ¶
SnipeTargetAt snipes a target at the given time
Types ¶
type DisplayRow ¶
DisplayRow of data
type DisplayTable ¶
type DisplayTable struct { Live []DisplayRow Upcoming []DisplayRow Offline []DisplayRow }
DisplayTable tracking data
func Display ¶
func Display() (d DisplayTable)
Display gives everyone we are tracking sorted by urgency for display by dashboard
type Module ¶
type Module interface { // information Hostname() string // called by track.poll with a list of targets to check CheckUpcoming(context.Context, []Target) error // called by track.AddTarget // give the target we added or nil // used to gather target information needed for tracking AddTarget(ctx context.Context, link string) (Target, error) }
Module is called by poll and add/remove target
type Target ¶
type Target interface { // real name of streamer Name() string // for display in dashboard Display() string // url string Link() string // save path SavePath() string // check for live status CheckLive(context.Context) (bool, error) // check for a live stream CheckStream(context.Context) (string, error) // callback when sniping starts BeginSnipe(context.Context) // callback when save starts BeginSave(context.Context) // callback when save ends EndSave(context.Context) // callback when user requests reload Reload(context.Context) }
Target is being tracked for stream activity
Click to show internal directories.
Click to hide internal directories.