vars

package
v1.5.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// List of names for top-level exported vars
	ClusterIDVarName = "cluster_id"
	ServerIDVarName  = "server_id"
	HostVarName      = "host"
	ProductVarName   = "product"
	VersionVarName   = "version"
	PlatformVarName  = "platform"

	NumTasksVarName         = "num_tasks"
	NumEnabledTasksVarName  = "num_enabled_tasks"
	NumSubscriptionsVarName = "num_subscriptions"

	UptimeVarName = "uptime"

	// The name of the product
	Product = "kapacitor"
)

Variables

View Source
var (
	// Global expvars
	NumTasksVar         = &kexpvar.Int{}
	NumEnabledTasksVar  = &kexpvar.Int{}
	NumSubscriptionsVar = kexpvar.NewIntSum()

	ClusterIDVar = &kexpvar.UUID{}
	ServerIDVar  = &kexpvar.UUID{}
	HostVar      = &kexpvar.String{}
	ProductVar   = &kexpvar.String{}
	VersionVar   = &kexpvar.String{}
	PlatformVar  = &kexpvar.String{}
)
View Source
var Info = info{}

Functions

func DeleteStatistic

func DeleteStatistic(key string)

DeleteStatistic removes the specified statistic from the published map.

func NewStatistic

func NewStatistic(name string, tags map[string]string) (string, *kexpvar.Map)

NewStatistic creates a new statistic in the published expvar map.

Types

type Infoer

type Infoer interface {
	ClusterID() uuid.UUID
	ServerID() uuid.UUID
	Hostname() string
	Version() string
	Product() string
	Platform() string
	NumTasks() int64
	NumEnabledTasks() int64
	NumSubscriptions() int64
	Uptime() time.Duration
}

type StatsData

type StatsData struct {
	Name   string                 `json:"name"`
	Tags   map[string]string      `json:"tags"`
	Values map[string]interface{} `json:"values"`
}

func GetStatsData

func GetStatsData() ([]StatsData, error)

GetStatsData return all stats data from the published expvars.

Jump to

Keyboard shortcuts

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