genericw

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 NewHttp

func NewHttp(meta libtsdb.Meta, encoder common.Encoder, req *http.Request) *HttpClient

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) Close

func (c *TcpClient) Close() error

func (*TcpClient) Flush

func (c *TcpClient) Flush() error

func (*TcpClient) Meta

func (c *TcpClient) Meta() libtsdb.Meta

func (*TcpClient) TcpTrace

func (c *TcpClient) TcpTrace() libtsdb.TcpTrace

func (*TcpClient) Trace

func (c *TcpClient) Trace() libtsdb.Trace

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL