Documentation ¶
Overview ¶
nolint
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 ¶ added in v1.14.0
func NewHTTPClient(config HTTPConfig) (*httpClient, error)
func NewUDPClient ¶ added in v1.14.0
Types ¶
type DatabaseNotFoundError ¶ added in v1.14.0
type HTTPConfig ¶ added in v1.14.0
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 RetentionPolicyTag string ExcludeRetentionPolicyTag bool 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 `toml:"username"` Password string `toml:"password"` Database string `toml:"database"` DatabaseTag string `toml:"database_tag"` ExcludeDatabaseTag bool `toml:"exclude_database_tag"` RetentionPolicy string `toml:"retention_policy"` RetentionPolicyTag string `toml:"retention_policy_tag"` ExcludeRetentionPolicyTag bool `toml:"exclude_retention_policy_tag"` UserAgent string `toml:"user_agent"` WriteConsistency string `toml:"write_consistency"` Timeout config.Duration `toml:"timeout"` UDPPayload config.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 ¶ added in v1.14.0
type QueryResponse struct {
Results []QueryResult `json:"results"`
}
QueryResponse is the response body from the /query endpoint
func (QueryResponse) Error ¶ added in v1.14.0
func (r QueryResponse) Error() string
type QueryResult ¶ added in v1.14.0
type QueryResult struct {
Err string `json:"error,omitempty"`
}
type WriteResponse ¶ added in v1.14.0
type WriteResponse struct {
Err string `json:"error,omitempty"`
}
WriteResponse is the response body from the /write endpoint
func (WriteResponse) Error ¶ added in v1.14.0
func (r WriteResponse) Error() string
Click to show internal directories.
Click to hide internal directories.