Documentation ¶
Index ¶
- Constants
- type DataAdder
- type Influxdb
- func (d *Influxdb) AddData(tags map[string]string, fields map[string]interface{}) error
- func (d *Influxdb) CollectContainerEvent(record *tcollector.ContainerRecord)
- func (d *Influxdb) CollectFlowEvent(record *tcollector.FlowRecord)
- func (d *Influxdb) CollectUserEvent(record *tcollector.UserRecord)
- func (d *Influxdb) CreateDB(dbname string) error
- func (d *Influxdb) ExecuteQuery(query string, dbname string) (*client.Response, error)
- func (d *Influxdb) Start() error
- func (d *Influxdb) Stop() error
Constants ¶
View Source
const ( // EventName is the constant used to store the name of the event type EventName = "EventName" // EventTypeFlow is the constant used to store event of type flows EventTypeFlow = "FlowEvents" // EventTypeContainer is the constant used to store event of type container EventTypeContainer = "ContainerEvents" // EventTypeContainerStart is the constant used to store event of type container start EventTypeContainerStart = "ContainerStartEvents" // EventTypeContainerStop is the constant used to store event of type container stop EventTypeContainerStop = "ContainerStopEvents" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataAdder ¶
type DataAdder interface { CreateDB(string) error AddData(tags map[string]string, fields map[string]interface{}) error ExecuteQuery(query string, dbname string) (*client.Response, error) }
DataAdder interface has all the methods required to interact with influxdb api
type Influxdb ¶
type Influxdb struct {
// contains filtered or unexported fields
}
Influxdb inplements a DataAdder interface for influxDB
func NewDBConnection ¶
func NewDBConnection(user string, pass string, addr string, db string, insecureSkipVerify bool) (*Influxdb, error)
NewDBConnection is used to create a new client and return influxdb handle
func (*Influxdb) CollectContainerEvent ¶
func (d *Influxdb) CollectContainerEvent(record *tcollector.ContainerRecord)
CollectContainerEvent implements trireme collector interface
func (*Influxdb) CollectFlowEvent ¶
func (d *Influxdb) CollectFlowEvent(record *tcollector.FlowRecord)
CollectFlowEvent implements trireme collector interface
func (*Influxdb) CollectUserEvent ¶
func (d *Influxdb) CollectUserEvent(record *tcollector.UserRecord)
CollectUserEvent implements trireme collector interface
func (*Influxdb) ExecuteQuery ¶
ExecuteQuery is used to execute a query given a database name
Click to show internal directories.
Click to hide internal directories.