Documentation ¶
Index ¶
- func CompressWithGzip(data io.Reader) (io.Reader, error)
- func NewReportWrite(capacity int) *reportWrite
- type BulkAction
- type BulkMetricRequest
- type CollectorConfig
- type Disruptor
- type GlobalLabel
- type Metric
- type MetricReport
- type Metrics
- type NamedMetrics
- type ReportClient
- type ReportConfig
- type ReportMode
- type Reporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressWithGzip ¶
CompressWithGzip takes an io.Reader as input and pipes it through a gzip.Writer returning an io.Reader containing the gzipped data. An error is returned if passing data to the gzip.Writer fails
func NewReportWrite ¶
func NewReportWrite(capacity int) *reportWrite
Types ¶
type BulkAction ¶
type BulkAction struct {
// contains filtered or unexported fields
}
func (*BulkAction) Push ¶
func (b *BulkAction) Push(request Metrics) error
type BulkMetricRequest ¶
type BulkMetricRequest []*Metric
func CreateBulkMetricRequest ¶
func CreateBulkMetricRequest() *BulkMetricRequest
func (*BulkMetricRequest) Add ¶
func (b *BulkMetricRequest) Add(name string, tags map[string]string, fields map[string]interface{}) *BulkMetricRequest
func (*BulkMetricRequest) AddWithTime ¶
func (b *BulkMetricRequest) AddWithTime(name string, tags map[string]string, fields map[string]interface{}, timestamp time.Time) *BulkMetricRequest
type CollectorConfig ¶
type CollectorConfig struct { Addr string `file:"addr" env:"COLLECTOR_ADDR" default:"collector:7076"` UserName string `file:"username" env:"COLLECTOR_AUTH_USERNAME"` Password string `file:"password" env:"COLLECTOR_AUTH_PASSWORD"` Retry int `file:"retry" env:"TELEMETRY_REPORT_STRICT_RETRY" default:"3"` }
type GlobalLabel ¶
type MetricReport ¶
type MetricReport interface { SetCFG(cfg *config) Send(in []*Metric) error CreateReportClient(addr, username, password string) *ReportClient }
type NamedMetrics ¶
type ReportClient ¶
func (*ReportClient) CreateReportClient ¶
func (c *ReportClient) CreateReportClient(addr, username, password string) *ReportClient
func (*ReportClient) Send ¶
func (c *ReportClient) Send(in []*Metric) error
func (*ReportClient) SetCFG ¶
func (c *ReportClient) SetCFG(cfg *config)
type ReportConfig ¶
type ReportConfig struct { Mode string `file:"mode" default:"performance"` UdpHost string `file:"udp_host" env:"HOST_IP" default:"localhost"` UdpPort string `file:"upd_port" env:"HOST_PORT" default:"7082"` Collector CollectorConfig `file:"collector"` BufferSize int `file:"buffer_size" env:"REPORT_BUFFER_SIZE" default:"200"` }
type ReportMode ¶
type ReportMode string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.