Versions in this module Expand all Collapse all v1 v1.7.9 Oct 27, 2019 Changes in this version + const ConsistencyAll + const ConsistencyAny + const ConsistencyOne + const ConsistencyQuorum + const DefaultHost + const DefaultPort + const DefaultTimeout + func EpochToTime(epoch int64, precision string) (time.Time, error) + func ParseConnectionString(path string, ssl bool) (url.URL, error) + func SetPrecision(t time.Time, precision string) time.Time + type BatchPoints struct + Database string + Points []Point + Precision string + RetentionPolicy string + Tags map[string]string + Time time.Time + WriteConsistency string + func (bp *BatchPoints) UnmarshalJSON(b []byte) error + type ChunkedResponse struct + func NewChunkedResponse(r io.Reader) *ChunkedResponse + func (r *ChunkedResponse) NextResponse() (*Response, error) + type Client struct + func NewClient(c Config) (*Client, error) + func (c *Client) Addr() string + func (c *Client) Ping() (time.Duration, string, error) + func (c *Client) Query(q Query) (*Response, error) + func (c *Client) QueryContext(ctx context.Context, q Query) (*Response, error) + func (c *Client) SetAuth(u, p string) + func (c *Client) SetPrecision(precision string) + func (c *Client) Write(bp BatchPoints) (*Response, error) + func (c *Client) WriteLineProtocol(data, database, retentionPolicy, precision, writeConsistency string) (*Response, error) + type Config struct + Password string + Precision string + Proxy func(req *http.Request) (*url.URL, error) + TLS *tls.Config + Timeout time.Duration + URL url.URL + UnixSocket string + UnsafeSsl bool + UserAgent string + Username string + WriteConsistency string + func NewConfig() Config + type Message struct + Level string + Text string + type Point struct + Fields map[string]interface{} + Measurement string + Precision string + Raw string + Tags map[string]string + Time time.Time + func (p *Point) MarshalJSON() ([]byte, error) + func (p *Point) MarshalString() string + func (p *Point) UnmarshalJSON(b []byte) error + type Query struct + ChunkSize int + Chunked bool + Command string + Database string + NodeID int + RetentionPolicy string + type Response struct + Err error + Results []Result + func (r *Response) Error() error + func (r *Response) MarshalJSON() ([]byte, error) + func (r *Response) UnmarshalJSON(b []byte) error + type Result struct + Err error + Messages []*Message + Series []models.Row + func (r *Result) MarshalJSON() ([]byte, error) + func (r *Result) UnmarshalJSON(b []byte) error