Documentation ¶
Index ¶
- Constants
- Variables
- func NewHTTPClient(config HTTPConfig) (*httpClient, error)
- func NewUDPClient(config UDPConfig) (*udpClient, error)
- type APIError
- type Client
- type Conn
- type DatabaseNotFoundError
- type Dialer
- type HTTPConfig
- type InfluxDB
- type QueryResponse
- type QueryResult
- type UDPConfig
- type WriteResponse
Constants ¶
View Source
const (
// DefaultMaxPayloadSize is the maximum length of the UDP data payload
DefaultMaxPayloadSize = 512
)
Variables ¶
View Source
var (
ErrMissingURL = errors.New("missing URL")
)
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(config HTTPConfig) (*httpClient, error)
func NewUDPClient ¶
Types ¶
type DatabaseNotFoundError ¶
type HTTPConfig ¶
type HTTPConfig struct { URL *url.URL UserAgent string Timeout time.Duration Username string Password string TLSConfig *tls.Config Proxy *url.URL Headers map[string]string ContentEncoding string Database string DatabaseTag string ExcludeDatabaseTag bool RetentionPolicy string Consistency string SkipDatabaseCreation bool InfluxUintSupport bool `toml:"influx_uint_support"` Serializer *influx.Serializer Log telegraf.Logger }
type InfluxDB ¶
type InfluxDB struct { URL string // url deprecated in 0.1.9; use urls URLs []string `toml:"urls"` Username string Password string Database string DatabaseTag string `toml:"database_tag"` ExcludeDatabaseTag bool `toml:"exclude_database_tag"` UserAgent string RetentionPolicy string WriteConsistency string Timeout internal.Duration UDPPayload internal.Size `toml:"udp_payload"` HTTPProxy string `toml:"http_proxy"` HTTPHeaders map[string]string `toml:"http_headers"` ContentEncoding string `toml:"content_encoding"` SkipDatabaseCreation bool `toml:"skip_database_creation"` InfluxUintSupport bool `toml:"influx_uint_support"` tls.ClientConfig Precision string // precision deprecated in 1.0; value is ignored CreateHTTPClientF func(config *HTTPConfig) (Client, error) CreateUDPClientF func(config *UDPConfig) (Client, error) Log telegraf.Logger // contains filtered or unexported fields }
InfluxDB struct is the primary data structure for the plugin
func (*InfluxDB) Description ¶
func (*InfluxDB) SampleConfig ¶
type QueryResponse ¶
type QueryResponse struct {
Results []QueryResult `json:"results"`
}
QueryResponse is the response body from the /query endpoint
func (QueryResponse) Error ¶
func (r QueryResponse) Error() string
type QueryResult ¶
type QueryResult struct {
Err string `json:"error,omitempty"`
}
type WriteResponse ¶
type WriteResponse struct {
Err string `json:"error,omitempty"`
}
WriteResponse is the response body from the /write endpoint
func (WriteResponse) Error ¶
func (r WriteResponse) Error() string
Click to show internal directories.
Click to hide internal directories.