-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.go
24 lines (21 loc) · 1009 Bytes
/
handler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package handler
// Handler kinds
const (
HTTPHandlerKind = "HTTP"
InfluxDBHandlerKind = "INFLUXDB"
)
// Handler defines the interface of a handler backend.
type Handler interface {
IntegrationHandler
DataDownChan() chan DataDownPayload // returns DataDownPayload channel
}
// IntegrationHandler defines the interface of an integration handler.
type IntegrationHandler interface {
SendDataUp(payload DataUpPayload) error // send data-up payload
SendJoinNotification(payload JoinNotification) error // send join notification
SendACKNotification(payload ACKNotification) error // send ack notification
SendErrorNotification(payload ErrorNotification) error // send error notification
SendStatusNotification(payload StatusNotification) error // send status notification
SendLocationNotification(payload LocationNotification) error // send location notofication
Close() error // closes the handler
}