Documentation
¶
Index ¶
- Constants
- Variables
- func NewHTTPClient(cfg HTTPConfig) (*httpClient, error)
- func NewUDPClient(config UDPConfig) (*udpClient, error)
- type APIError
- type Client
- type Conn
- type DatabaseNotFoundError
- type Dialer
- type HTTPConfig
- type InfluxDB
- type QueryResponseError
- type QueryResult
- type UDPConfig
- type WriteResponseError
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(cfg 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 config.Secret
Password config.Secret
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 `toml:"url" deprecated:"0.1.9;2.0.0;use 'urls' instead"`
URLs []string `toml:"urls"`
Username config.Secret `toml:"username"`
Password config.Secret `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 `toml:"precision" deprecated:"1.0.0;option 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) SampleConfig ¶
type QueryResponseError ¶ added in v1.25.0
type QueryResponseError struct {
Results []QueryResult `json:"results"`
}
QueryResponseError is the response body from the /query endpoint
func (QueryResponseError) Error ¶ added in v1.25.0
func (r QueryResponseError) Error() string
type QueryResult ¶ added in v1.14.0
type QueryResult struct {
Err string `json:"error,omitempty"`
}
type WriteResponseError ¶ added in v1.25.0
type WriteResponseError struct {
Err string `json:"error,omitempty"`
}
WriteResponseError is the response body from the /write endpoint
func (WriteResponseError) Error ¶ added in v1.25.0
func (r WriteResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.