Documentation ¶
Index ¶
- type CouchBulkDevicesResponse
- type CouchBulkDocumentRequest
- type CouchBulkRequestItem
- type CouchBulkUpdateResponse
- type CouchDeviceBuffer
- type CouchStaticDevice
- type CouchStaticUpdateBody
- type ElkStaticDeviceForwarder
- type ElkStaticForwarder
- type ElkStaticRoomForwarder
- type ElkTimeseriesForwarder
- type Rev
- type WebsocketForwarder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CouchBulkDevicesResponse ¶
type CouchBulkDevicesResponse struct { Results []struct { ID string `json:"id"` Docs []struct { OK CouchStaticDevice `json:"ok"` Error CouchBulkUpdateResponse `json:"error"` } `json:"docs"` } `json:"results"` }
CouchBulkDevicesResponse .
type CouchBulkDocumentRequest ¶
type CouchBulkDocumentRequest struct {
Docs []CouchBulkRequestItem `json:"docs"`
}
CouchBulkDocumentRequest .
type CouchBulkRequestItem ¶
type CouchBulkRequestItem struct {
ID string `json:"id"`
}
CouchBulkRequestItem .
type CouchBulkUpdateResponse ¶
type CouchBulkUpdateResponse struct { OK bool `json:"ok,omitempty"` ID string `json:"id,omitempty"` Revision string `json:"rev,omitempty"` Error string `json:"error,omitempty"` Reason string `json:"reason,omitempty"` }
CouchBulkUpdateResponse is the couch reseponse to bulk update/create requests
type CouchDeviceBuffer ¶
type CouchDeviceBuffer struct {
// contains filtered or unexported fields
}
CouchDeviceBuffer takes a static device and buffers them for storage in couch
func GetDefaultCouchDeviceBuffer ¶
func GetDefaultCouchDeviceBuffer(couchaddr, database string, interval time.Duration) *CouchDeviceBuffer
GetDefaultCouchDeviceBuffer starts and returns a buffer manager
func (*CouchDeviceBuffer) Send ¶
func (c *CouchDeviceBuffer) Send(toSend interface{}) error
Send fulfils the manager interface
type CouchStaticDevice ¶
type CouchStaticDevice struct { sd.StaticDevice Rev }
CouchStaticDevice is just an sd StaticDevice with an _id and a _rev
type CouchStaticUpdateBody ¶
type CouchStaticUpdateBody struct {
Docs []CouchStaticDevice `json:"docs"`
}
CouchStaticUpdateBody is a utility to marshal the structure that couch bulk API expects
type ElkStaticDeviceForwarder ¶
type ElkStaticDeviceForwarder struct { ElkStaticForwarder // contains filtered or unexported fields }
ElkStaticDeviceForwarder is for a device
func GetDefaultElkStaticDeviceForwarder ¶
func GetDefaultElkStaticDeviceForwarder(URL string, index func() string, interval time.Duration, update bool) *ElkStaticDeviceForwarder
GetDefaultElkStaticDeviceForwarder returns a regular static device forwarder with a buffer size of 10000
func (*ElkStaticDeviceForwarder) Delete ¶
func (e *ElkStaticDeviceForwarder) Delete(id string) error
func (*ElkStaticDeviceForwarder) Send ¶
func (e *ElkStaticDeviceForwarder) Send(toSend interface{}) error
Send takes a device and adds it to the buffer
type ElkStaticForwarder ¶
type ElkStaticForwarder struct {
// contains filtered or unexported fields
}
ElkStaticForwarder is the common stuff
type ElkStaticRoomForwarder ¶
type ElkStaticRoomForwarder struct { ElkStaticForwarder // contains filtered or unexported fields }
ElkStaticRoomForwarder is for rooms
func GetDefaultElkStaticRoomForwarder ¶
func GetDefaultElkStaticRoomForwarder(URL string, index func() string, interval time.Duration, update bool) *ElkStaticRoomForwarder
GetDefaultElkStaticRoomForwarder returns a regular static room forwarder with a buffer size of 10000
func (*ElkStaticRoomForwarder) Delete ¶
func (e *ElkStaticRoomForwarder) Delete(id string) error
func (*ElkStaticRoomForwarder) Send ¶
func (e *ElkStaticRoomForwarder) Send(toSend interface{}) error
Send takes a room and adds it to the buffer
type ElkTimeseriesForwarder ¶
type ElkTimeseriesForwarder struct { ElkStaticForwarder // contains filtered or unexported fields }
NOT THREAD SAFE
func GetDefaultElkTimeSeries ¶
func GetDefaultElkTimeSeries(URL string, index func() string, interval time.Duration) *ElkTimeseriesForwarder
returns a default elk event forwarder after setting it up.
func (*ElkTimeseriesForwarder) Send ¶
func (e *ElkTimeseriesForwarder) Send(toSend interface{}) error
type WebsocketForwarder ¶
type WebsocketForwarder struct { }
func GetDefaultWebsocketForwarder ¶
func GetDefaultWebsocketForwarder() *WebsocketForwarder
func (*WebsocketForwarder) Send ¶
func (e *WebsocketForwarder) Send(toSend interface{}) error