reporter

package
v0.0.0-...-5818e05 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHTTPReporter = &HTTPReporter{
	client:         defaultHTTPClient,
	Urls:           []string{},
	Batch:          200,
	Ticker:         time.Tick(3 * time.Second),
	Timeout:        5 * time.Second,
	RetryCount:     3,
	MaxConcurrency: 3,
	DropEndpoint:   false,
}
View Source
var DefaultStreamReporter = &StreamReporter{
	Writer:         os.Stdout,
	Batch:          200,
	Ticker:         time.Tick(5 * time.Second),
	MaxConcurrency: 3,
}

Functions

This section is empty.

Types

type HTTPReportedMetric

type HTTPReportedMetric struct {
	Endpoint  string      `json:"endpoint"`
	Metric    string      `json:"metric"`
	Step      uint32      `json:"step"`
	Value     interface{} `json:"value"`
	Type      string      `json:"counterType"`
	Tags      string      `json:"tags"`
	Timestamp int64       `json:"timestamp"`
}

type HTTPReporter

type HTTPReporter struct {
	Urls           []string
	Batch          int
	Ticker         <-chan time.Time
	Timeout        time.Duration
	RetryCount     int
	MaxConcurrency int
	DropEndpoint   bool
	// contains filtered or unexported fields
}

func (*HTTPReporter) Report

func (r *HTTPReporter) Report(ch chan aura.Metric)

type StreamReporter

type StreamReporter struct {
	Writer         io.Writer
	Batch          int
	Ticker         <-chan time.Time
	MaxConcurrency int
}

func (*StreamReporter) Report

func (r *StreamReporter) Report(ch chan aura.Metric)

Jump to

Keyboard shortcuts

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