Versions in this module Expand all Collapse all v0 v0.0.1 Jul 27, 2022 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 BooleanValue bool + func (v BooleanValue) MarshalJSON() ([]byte, error) + 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 ContentEncoding string + const DefaultEncoding + const GzipEncoding + type DurationValue time.Duration + func (v DurationValue) MarshalJSON() ([]byte, 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 + WriteEncoding ContentEncoding + type Identifier string + func (v Identifier) MarshalJSON() ([]byte, error) + type IntegerValue int64 + func (v IntegerValue) MarshalJSON() ([]byte, error) + type Message struct + Level string + Text string + type NumberValue float64 + func (v NumberValue) MarshalJSON() ([]byte, error) + type Params map[string]interface + 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 RegexValue string + func (v RegexValue) MarshalJSON() ([]byte, error) + type Response struct + Err string + Results []Result + func (r *Response) Error() error + type Result struct + Err string + Messages []*Message + Series []models.Row + StatementId int + type StringValue string + func (v StringValue) MarshalJSON() ([]byte, error) + type TimeValue time.Time + func (v TimeValue) MarshalJSON() ([]byte, error) + type UDPConfig struct + Addr string + PayloadSize int