Documentation ¶
Index ¶
- type HttpClient
- func (c *HttpClient) AllowInsecure()
- func (c *HttpClient) Close() error
- func (c *HttpClient) DisableHttpTrace()
- func (c *HttpClient) EnableHttpTrace()
- func (c *HttpClient) Flush() error
- func (c *HttpClient) HttpStatusCode() int
- func (c *HttpClient) HttpTrace() libtsdb.HttpTrace
- func (c *HttpClient) Meta() libtsdb.Meta
- func (c *HttpClient) SetHttpClient(h *http.Client)
- func (c *HttpClient) Trace() libtsdb.Trace
- func (c *HttpClient) WriteDoublePoint(p *pb.PointDoubleTagged)
- func (c *HttpClient) WriteIntPoint(p *pb.PointIntTagged)
- func (c *HttpClient) WriteSeriesDoubleTagged(p *pb.SeriesDoubleTagged)
- func (c *HttpClient) WriteSeriesIntTagged(p *pb.SeriesIntTagged)
- type TcpClient
- func (c *TcpClient) Close() error
- func (c *TcpClient) Flush() error
- func (c *TcpClient) Meta() libtsdb.Meta
- func (c *TcpClient) TcpTrace() libtsdb.TcpTrace
- func (c *TcpClient) Trace() libtsdb.Trace
- func (c *TcpClient) WriteDoublePoint(p *pb.PointDoubleTagged)
- func (c *TcpClient) WriteIntPoint(p *pb.PointIntTagged)
- func (c *TcpClient) WriteSeriesDoubleTagged(p *pb.SeriesDoubleTagged)
- func (c *TcpClient) WriteSeriesIntTagged(p *pb.SeriesIntTagged)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient is a generic HTTP based client for write, it is not go routine safe because encoder
func (*HttpClient) AllowInsecure ¶
func (c *HttpClient) AllowInsecure()
func (*HttpClient) Close ¶
func (c *HttpClient) Close() error
func (*HttpClient) DisableHttpTrace ¶
func (c *HttpClient) DisableHttpTrace()
func (*HttpClient) EnableHttpTrace ¶
func (c *HttpClient) EnableHttpTrace()
func (*HttpClient) Flush ¶
func (c *HttpClient) Flush() error
Flush sends encoded data to server and reset encoder
func (*HttpClient) HttpStatusCode ¶
func (c *HttpClient) HttpStatusCode() int
func (*HttpClient) HttpTrace ¶
func (c *HttpClient) HttpTrace() libtsdb.HttpTrace
func (*HttpClient) Meta ¶
func (c *HttpClient) Meta() libtsdb.Meta
func (*HttpClient) SetHttpClient ¶
func (c *HttpClient) SetHttpClient(h *http.Client)
func (*HttpClient) Trace ¶
func (c *HttpClient) Trace() libtsdb.Trace
func (*HttpClient) WriteDoublePoint ¶
func (c *HttpClient) WriteDoublePoint(p *pb.PointDoubleTagged)
WriteDoublePoint only writes to encoder, but does not flush it
func (*HttpClient) WriteIntPoint ¶
func (c *HttpClient) WriteIntPoint(p *pb.PointIntTagged)
WriteIntPoint only writes to encoder, but does not flush it
func (*HttpClient) WriteSeriesDoubleTagged ¶
func (c *HttpClient) WriteSeriesDoubleTagged(p *pb.SeriesDoubleTagged)
func (*HttpClient) WriteSeriesIntTagged ¶
func (c *HttpClient) WriteSeriesIntTagged(p *pb.SeriesIntTagged)
type TcpClient ¶
type TcpClient struct {
// contains filtered or unexported fields
}
TcpClient encode points using encoder and write to raw tcp connection TODO: re connect when fail TODO: allow insecure
func NewTcp ¶
func NewTcp(meta libtsdb.Meta, encoder common.Encoder, addr string, timeout time.Duration) (*TcpClient, error)
TODO: we should allow dial later
func (*TcpClient) WriteDoublePoint ¶
func (c *TcpClient) WriteDoublePoint(p *pb.PointDoubleTagged)
WriteDoublePoint only writes to encoder, but does not flush it
func (*TcpClient) WriteIntPoint ¶
func (c *TcpClient) WriteIntPoint(p *pb.PointIntTagged)
WriteIntPoint only writes to encoder, but does not flush it
func (*TcpClient) WriteSeriesDoubleTagged ¶
func (c *TcpClient) WriteSeriesDoubleTagged(p *pb.SeriesDoubleTagged)
func (*TcpClient) WriteSeriesIntTagged ¶
func (c *TcpClient) WriteSeriesIntTagged(p *pb.SeriesIntTagged)
Click to show internal directories.
Click to hide internal directories.