statreporter

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2014 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

View Source
const (
	StatshubUrlTemplate = "https://%s/stats/%s"
)

Variables

This section is empty.

Functions

func OnBytesGiven

func OnBytesGiven(clientIp string, bytes int64)

OnBytesGiven registers the fact that bytes were given (sent or received)

func Start

func Start(reportingPeriod time.Duration, statshubAddr string, instanceId string, countryCode string)

Start runs a goroutine that periodically coalesces the collected statistics and reports them to statshub via HTTP post

Types

type UpdateBuilder

type UpdateBuilder struct {
	// contains filtered or unexported fields
}

func Gauge

func Gauge(key string) *UpdateBuilder

func Increment

func Increment(key string) *UpdateBuilder

func (*UpdateBuilder) Add

func (b *UpdateBuilder) Add(val int64)

func (*UpdateBuilder) Set

func (b *UpdateBuilder) Set(val int64)

Jump to

Keyboard shortcuts

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