Documentation ¶
Index ¶
- type Producer
- type Scheduler
- func (s *Scheduler) All() TimeSlice
- func (s *Scheduler) NamesForTime(t time.Time) []string
- func (s *Scheduler) Next() *time.Time
- func (s *Scheduler) Report()
- func (s *Scheduler) Set(t time.Time, name string) error
- func (s *Scheduler) Step()
- func (s *Scheduler) TimesForName(n string) []time.Time
- func (s *Scheduler) WaitForNext() []string
- type TimeSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Producer ¶
type Producer interface {
Connect(context.Context, *grpc.ClientConn) error
}
Producer is an object that uses a gRPC connection to emit events to the server.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler holds timeSlice objects and provides an methods to update them..
func NewScheduler ¶
NewScheduler returns a new Scheduler.
func (*Scheduler) NamesForTime ¶
NamesForTime returns all event names that are scheduled for a given timeSlice.
func (*Scheduler) Step ¶
func (s *Scheduler) Step()
Step deletes the next timeSlice. This is determined to be the timeSlice that has just run. The expectation is that Step() is called once the events have completed firing to advance to the next position in time.
func (*Scheduler) TimesForName ¶
TimesForName returns all timeSlices for a given event name.
func (*Scheduler) WaitForNext ¶
WaitForNext is a blocking function that waits for the next available time to arrive before returning the names to the caller.