Documentation ¶
Index ¶
Constants ¶
View Source
const ( OperationLabel = "operation" SuccessLabel = "success" )
Variables ¶
View Source
var SuccessValues = map[bool]SuccessType{ // contains filtered or unexported fields }
Functions ¶
func NewCollector ¶
func NewProvider ¶
Types ¶
type Collector ¶
type Collector interface { IncrementRequests() DecrementRequests() AddDuration(millisDuration time.Duration, requestType c.ApiRequestType, success bool) }
type Metrics ¶
type Metrics struct { RequestsSent metrics.Counter RequestsReceived metrics.Counter RequestDuration metrics.Histogram // contains filtered or unexported fields }
func NewMetrics ¶
type OperationType ¶
type OperationType = string
const ( Transfer OperationType = "transfer" Balance OperationType = "balance" Withdraw OperationType = "withdraw" )
type Provider ¶
type Provider struct{}
func (*Provider) NewCounter ¶
func (p *Provider) NewCounter(metrics.CounterOpts) metrics.Counter
func (*Provider) NewHistogram ¶
func (p *Provider) NewHistogram(metrics.HistogramOpts) metrics.Histogram
type Reporter ¶
func NewReporter ¶
type SuccessType ¶
type SuccessType = string
Click to show internal directories.
Click to hide internal directories.