Documentation ¶
Index ¶
- Variables
- func HasDoubleDot(p []byte) bool
- func RemoveDoubleDot(p []byte) []byte
- func TelegrafEncodeTags(tags map[string]string) string
- type Base
- func (base *Base) DroppedHandler(w http.ResponseWriter, r *http.Request)
- func (base *Base) Init(logger *zap.Logger, config tags.TagConfig, opts ...Option)
- func (base *Base) PickleParseBytes(ctx context.Context, b []byte, now uint32)
- func (base *Base) PickleParser(ctx context.Context, in chan []byte)
- func (base *Base) PlainParseBuffer(ctx context.Context, b *Buffer, buf *tags.GraphiteBuf)
- func (base *Base) PlainParseLine(p []byte, now uint32, buf *tags.GraphiteBuf) ([]byte, float64, uint32, error)
- func (base *Base) PlainParser(ctx context.Context, in chan *Buffer)
- func (base *Base) SendStat(send func(metric string, value float64), fields ...string)
- type Buffer
- type GRPC
- func (g *GRPC) Addr() net.Addr
- func (g *GRPC) Listen(addr *net.TCPAddr) error
- func (g *GRPC) Stat(send func(metric string, value float64))
- func (g *GRPC) Store(ctx context.Context, in *pb.Payload) (*empty.Empty, error)
- func (g *GRPC) StoreSync(ctx context.Context, in *pb.Payload) (*empty.Empty, error)
- type Option
- type Pickle
- type PrometheusRemoteWrite
- type Receiver
- type TCP
- type TelegrafHttpJson
- type TelegrafHttpMetric
- type TelegrafHttpPayload
- type UDP
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferPool = sync.Pool{ New: func() interface{} { return &Buffer{} }, }
Functions ¶
func HasDoubleDot ¶
func RemoveDoubleDot ¶
func TelegrafEncodeTags ¶ added in v0.9.0
Types ¶
type Base ¶ added in v0.9.0
func (*Base) DroppedHandler ¶ added in v0.9.1
func (base *Base) DroppedHandler(w http.ResponseWriter, r *http.Request)
func (*Base) PickleParseBytes ¶ added in v0.9.0
func (*Base) PickleParser ¶ added in v0.9.0
func (*Base) PlainParseBuffer ¶ added in v0.9.0
func (*Base) PlainParseLine ¶ added in v0.10.0
func (*Base) PlainParser ¶ added in v0.9.0
type GRPC ¶ added in v0.6.1
type GRPC struct { Base // contains filtered or unexported fields }
GRPC receive metrics from GRPC connections
type Option ¶
type Option func(interface{}) error
func ConcatChar ¶ added in v0.11.2
ConcatChar creates option for New constructor
func DropFuture ¶ added in v0.9.0
DropFuture creates option for New contructor
func DropLongerThan ¶ added in v0.11.2
DropLongerThan creates option for New constructor
func ParseThreads ¶
ParseThreads creates option for New contructor
func ReadTimeout ¶ added in v0.11.0
ReadTimeout creates option for New constructor
func WriteChan ¶
func WriteChan(ch chan *RowBinary.WriteBuffer) Option
WriteChan creates option for New contructor
type Pickle ¶ added in v0.6.1
type Pickle struct { Base // contains filtered or unexported fields }
Pickle receive metrics from TCP connections
func (*Pickle) HandleConnection ¶ added in v0.6.1
type PrometheusRemoteWrite ¶ added in v0.7.0
type PrometheusRemoteWrite struct { Base // contains filtered or unexported fields }
func (*PrometheusRemoteWrite) Addr ¶ added in v0.7.0
func (rcv *PrometheusRemoteWrite) Addr() net.Addr
Addr returns binded socket address. For bind port 0 in tests
func (*PrometheusRemoteWrite) Listen ¶ added in v0.7.0
func (rcv *PrometheusRemoteWrite) Listen(addr *net.TCPAddr) error
Listen bind port. Receive messages and send to out channel
func (*PrometheusRemoteWrite) ServeHTTP ¶ added in v0.7.0
func (rcv *PrometheusRemoteWrite) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*PrometheusRemoteWrite) Stat ¶ added in v0.7.0
func (rcv *PrometheusRemoteWrite) Stat(send func(metric string, value float64))
type Receiver ¶
type TCP ¶
type TCP struct { Base // contains filtered or unexported fields }
TCP receive metrics from TCP connections
func (*TCP) HandleConnection ¶
type TelegrafHttpJson ¶ added in v0.9.0
type TelegrafHttpJson struct { Base // contains filtered or unexported fields }
func (*TelegrafHttpJson) Addr ¶ added in v0.9.0
func (rcv *TelegrafHttpJson) Addr() net.Addr
Addr returns binded socket address. For bind port 0 in tests
func (*TelegrafHttpJson) Listen ¶ added in v0.9.0
func (rcv *TelegrafHttpJson) Listen(addr *net.TCPAddr) error
Listen bind port. Receive messages and send to out channel
func (*TelegrafHttpJson) ServeHTTP ¶ added in v0.9.0
func (rcv *TelegrafHttpJson) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*TelegrafHttpJson) Stat ¶ added in v0.9.0
func (rcv *TelegrafHttpJson) Stat(send func(metric string, value float64))
type TelegrafHttpMetric ¶ added in v0.9.0
type TelegrafHttpPayload ¶ added in v0.9.0
type TelegrafHttpPayload struct {
Metrics []TelegrafHttpMetric `json:"metrics"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.