Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultConnBufSize = 16 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallbackHandler ¶
type CallbackHandler struct { Metrics func(*tlstatshouse.MetricBytes, mapping.MapCallbackFunc) (h data_model.MappedMetricHeader, done bool) ParseError func([]byte, error) }
func (CallbackHandler) HandleMetrics ¶
func (c CallbackHandler) HandleMetrics(b *tlstatshouse.MetricBytes, cb mapping.MapCallbackFunc) (h data_model.MappedMetricHeader, done bool)
func (CallbackHandler) HandleParseError ¶
func (c CallbackHandler) HandleParseError(pkt []byte, err error)
type Handler ¶
type Handler interface { HandleMetrics(*tlstatshouse.MetricBytes, mapping.MapCallbackFunc) (h data_model.MappedMetricHeader, done bool) // if cannot process immediately, and needs to own data, should swap another metric from the pool HandleParseError([]byte, error) }
type RPCReceiver ¶
type RPCReceiver struct { Handler Handler StatCallsTotalOK atomic.Uint64 StatCallsTotalErr atomic.Uint64 // contains filtered or unexported fields }
func MakeRPCReceiver ¶
func MakeRPCReceiver(ag *agent.Agent, h Handler) *RPCReceiver
func (*RPCReceiver) RawAddMetricsBatch ¶
func (r *RPCReceiver) RawAddMetricsBatch(ctx context.Context, hctx *rpc.HandlerContext) error
type UDP ¶
type UDP struct {
// contains filtered or unexported fields
}
func (*UDP) StatBatchesTotalErr ¶
func (*UDP) StatBatchesTotalOK ¶
func (*UDP) StatBytesTotal ¶
func (*UDP) StatPacketsTotal ¶
Click to show internal directories.
Click to hide internal directories.