Documentation
¶
Index ¶
- type ListDevices
- type Service
- func (s *Service) GetHttp(method, stationId, sensorId string) *station2.Sensor
- func (s *Service) GetPublisher(id string) publisher.Publisher
- func (s *Service) PollDevice(dev device.Device, instance device.Instance, publisher publisher.Publisher, ...) error
- func (s *Service) PostInit() error
- func (s *Service) PublishMetric(m api.Metric) error
- func (s *Service) RunDevice(dev device.Device, instance device.Instance, publisher publisher.Publisher)
- func (s *Service) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListDevices ¶
type ListDevices struct {
ListDevices *bool `kernel:"flag,list-devices,List Devices"`
}
func (*ListDevices) PostInit ¶
func (s *ListDevices) PostInit() error
type Service ¶
type Service struct { Daemon *kernel.Daemon `kernel:"inject"` Cron *cron.CronService `kernel:"inject"` Config config.Manager `kernel:"inject"` DatabaseBroker broker.DatabaseBroker `kernel:"inject"` Stations *station.Stations `kernel:"inject"` Rest *rest.Server `kernel:"inject"` WebPrefix *string `kernel:"flag,web-prefix,Prefix for http endpoints,/i"` // contains filtered or unexported fields }
func (*Service) PollDevice ¶
func (s *Service) PollDevice(dev device.Device, instance device.Instance, publisher publisher.Publisher, cronDef string) error
PollDevice will configure a task that will poll the given instance based on a cron definition. Any errors returned by the device when it's polled will be reported in the log.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.