Documentation ¶
Index ¶
- type Controller
- type ControllerFactory
- type ControllerStats
- type Done
- type Err
- type EvalQueue
- type Event
- type Identifier
- type PollSensor
- type Result
- type Sensor
- type Success
- type System
- func (s *System) AddController(key string, ctrl Controller)
- func (s *System) Close() error
- func (s *System) DeleteController(key string)
- func (s *System) GetController(key string) (ctrl Controller, ok bool)
- func (s *System) Logger() *log.Logger
- func (s *System) LoggerFor(entityID string) *log.Entry
- func (s *System) RangeControllerStats(consumer func(k string, v ControllerStats) bool)
- func (s *System) Run()
- func (s *System) Submit(event *Event) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type ControllerFactory ¶
type ControllerFactory func(event *Event) (ctrl Controller, err error)
type ControllerStats ¶
func (ControllerStats) RecordEval ¶
func (c ControllerStats) RecordEval() ControllerStats
type Done ¶
type Done struct {
Msg string
}
Done removes the controller for this evaluation, which prevents any further evaluations
type Identifier ¶
type Identifier interface {
ID() string
}
type PollSensor ¶
type PollSensor struct {
// contains filtered or unexported fields
}
func NewPollSensor ¶
func NewPollSensor(interval time.Duration, pollFn func(queue EvalQueue)) *PollSensor
func (*PollSensor) Close ¶
func (s *PollSensor) Close() error
func (*PollSensor) Run ¶
func (s *PollSensor) Run(evalQueue EvalQueue)
func (*PollSensor) Start ¶
func (s *PollSensor) Start(evalQueue EvalQueue) error
type System ¶
type System struct {
// contains filtered or unexported fields
}
Future: support parallel executions in evaluator
func NewSystem ¶
func NewSystem(factory ControllerFactory) *System
func (*System) AddController ¶
func (s *System) AddController(key string, ctrl Controller)
func (*System) DeleteController ¶
func (*System) GetController ¶
func (s *System) GetController(key string) (ctrl Controller, ok bool)
func (*System) RangeControllerStats ¶
func (s *System) RangeControllerStats(consumer func(k string, v ControllerStats) bool)
Click to show internal directories.
Click to hide internal directories.