Versions in this module Expand all Collapse all v1 v1.7.9 Oct 27, 2019 Changes in this version + const UDPPayloadSize + type BatchPoints interface + AddPoint func(p *Point) + AddPoints func(ps []*Point) + Database func() string + Points func() []*Point + Precision func() string + RetentionPolicy func() string + SetDatabase func(s string) + SetPrecision func(s string) error + SetRetentionPolicy func(s string) + SetWriteConsistency func(s string) + WriteConsistency func() string + func NewBatchPoints(conf BatchPointsConfig) (BatchPoints, error) + type BatchPointsConfig struct + Database string + Precision string + RetentionPolicy string + WriteConsistency string + type ChunkedResponse struct + func NewChunkedResponse(r io.Reader) *ChunkedResponse + func (r *ChunkedResponse) Close() error + func (r *ChunkedResponse) NextResponse() (*Response, error) + type Client interface + Close func() error + Ping func(timeout time.Duration) (time.Duration, string, error) + Query func(q Query) (*Response, error) + QueryAsChunk func(q Query) (*ChunkedResponse, error) + Write func(bp BatchPoints) error + func NewHTTPClient(conf HTTPConfig) (Client, error) + func NewUDPClient(conf UDPConfig) (Client, error) + type HTTPConfig struct + Addr string + InsecureSkipVerify bool + Password string + Proxy func(req *http.Request) (*url.URL, error) + TLSConfig *tls.Config + Timeout time.Duration + UserAgent string + Username string + type Message struct + Level string + Text string + type Point struct + func NewPoint(name string, tags map[string]string, fields map[string]interface{}, ...) (*Point, error) + func NewPointFrom(pt models.Point) *Point + func (p *Point) Fields() (map[string]interface{}, error) + func (p *Point) Name() string + func (p *Point) PrecisionString(precision string) string + func (p *Point) String() string + func (p *Point) Tags() map[string]string + func (p *Point) Time() time.Time + func (p *Point) UnixNano() int64 + type Query struct + ChunkSize int + Chunked bool + Command string + Database string + Parameters map[string]interface{} + Precision string + RetentionPolicy string + func NewQuery(command, database, precision string) Query + func NewQueryWithParameters(command, database, precision string, parameters map[string]interface{}) Query + func NewQueryWithRP(command, database, retentionPolicy, precision string) Query + type Response struct + Err string + Results []Result + func (r *Response) Error() error + type Result struct + Err string + Messages []*Message + Series []models.Row + type UDPConfig struct + Addr string + PayloadSize int