Documentation
¶
Index ¶
- type CheckRes
- type DgraphHandler
- func (d *DgraphHandler) CheckAndSetSchema()
- func (d *DgraphHandler) HandleBackup(br *db.BackupRequest)
- func (d *DgraphHandler) HandleDump(dr *db.DumpRequest, conn net.Conn)
- func (d *DgraphHandler) HandleObservations(obs *observation.InputObservation)
- func (d *DgraphHandler) HandleQuery(qr *db.QueryRequest, conn net.Conn)
- type GetRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRes ¶
type CheckRes struct {
ResultsSensors []struct {
UID string `json:"uid"`
SensorID string `json:"sensor_id"`
}
ResultsObs []struct {
UID string `json:"uid"`
Ohash string `json:"ohash"`
SeenBySame []map[string]interface{} `json:"seen_by_same"`
}
}
CheckRes is a struct to hold values looked up during import
type DgraphHandler ¶
type DgraphHandler struct {
Client *dgo.Dgraph
BufChunks []*observation.InputObservation
SensorIDCacheUpdateLock sync.Mutex
SensorIDCache *cache.Cache
}
DgraphHandler is a Handler for balboa implemented to communicate with the Dgraph database
func (*DgraphHandler) CheckAndSetSchema ¶
func (d *DgraphHandler) CheckAndSetSchema()
CheckAndSetSchema ensures that a schema is set on the database that is used in the handler.
func (*DgraphHandler) HandleBackup ¶
func (d *DgraphHandler) HandleBackup(br *db.BackupRequest)
HandleBackup is not implemented yet.
func (*DgraphHandler) HandleDump ¶
func (d *DgraphHandler) HandleDump(dr *db.DumpRequest, conn net.Conn)
HandleDump is not implemented yet.
func (*DgraphHandler) HandleObservations ¶
func (d *DgraphHandler) HandleObservations(obs *observation.InputObservation)
HandleObservations processes a single observation for insertion.
func (*DgraphHandler) HandleQuery ¶
func (d *DgraphHandler) HandleQuery(qr *db.QueryRequest, conn net.Conn)
HandleQuery implements a query for a combination of parameters.
Click to show internal directories.
Click to hide internal directories.