Documentation
¶
Index ¶
- Constants
- func VersionSegments(segments string) []int
- type Diagnostics
- func (d *Diagnostics) CheckVersion() error
- func (d *Diagnostics) Close() error
- func (d *Diagnostics) CompareVersion(value string) error
- func (d *Diagnostics) Encode() ([]byte, error)
- func (d *Diagnostics) Flush() error
- func (d *Diagnostics) Open()
- func (d *Diagnostics) Set(name string, value interface{})
- func (d *Diagnostics) SetInterval(i time.Duration)
- func (d *Diagnostics) SetLogger(logger io.Writer)
- func (d *Diagnostics) SetVersion(v string)
Constants ¶
const (
DefaultVersionCheckURL = "https://diagnostics.pilosa.com/v0/version"
)
Default version check URL.
Variables ¶
This section is empty.
Functions ¶
func VersionSegments ¶
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) 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) 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.