diagnostics

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVersionCheckURL = "https://diagnostics.pilosa.com/v0/version"
)

Default version check URL.

Variables

This section is empty.

Functions

func VersionSegments

func VersionSegments(segments string) []int

VersionSegments returns the numeric segments of the version as a slice of ints.

Types

type Diagnostics

type Diagnostics struct {
	VersionURL string
	// contains filtered or unexported fields
}

Diagnostics represents a client to the Pilosa cluster.

func New

func New(host string) *Diagnostics

New returns a pointer to a new Diagnostics Client given an addr in the format "hostname:port".

func (*Diagnostics) CheckVersion

func (d *Diagnostics) CheckVersion() error

CheckVersion of the local build against Pilosa master.

func (*Diagnostics) Close

func (d *Diagnostics) Close() error

Close notify goroutine to stop.

func (*Diagnostics) CompareVersion

func (d *Diagnostics) CompareVersion(value string) error

CompareVersion check version strings.

func (*Diagnostics) Encode

func (d *Diagnostics) Encode() ([]byte, error)

Encode metrics maps into the json message format.

func (*Diagnostics) Flush

func (d *Diagnostics) Flush() error

Flush sends the current metrics.

func (*Diagnostics) Open

func (d *Diagnostics) Open()

Open configures the circuit breaker used by the HTTP client.

func (*Diagnostics) Set

func (d *Diagnostics) Set(name string, value interface{})

Set adds a key value metric.

func (*Diagnostics) SetInterval

func (d *Diagnostics) SetInterval(i time.Duration)

SetInterval of the diagnostic go routine and match with the circuit breaker timeout.

func (*Diagnostics) SetLogger

func (d *Diagnostics) SetLogger(logger io.Writer)

SetLogger Set the logger output type.

func (*Diagnostics) SetVersion

func (d *Diagnostics) SetVersion(v string)

SetVersion of locally running Pilosa Cluster to check against master.

Jump to

Keyboard shortcuts

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