Documentation
¶
Index ¶
- Constants
- type Gmetric
- func (g *Gmetric) AddServer(s Server)
- func (g *Gmetric) CloseConnections(conn []*net.UDPConn)
- func (g *Gmetric) DebugBuffer(buf []byte)
- func (g *Gmetric) OpenConnections() []*net.UDPConn
- func (g *Gmetric) SendMetric(name string, value string, metricType uint32, units string, slope uint32, ...)
- func (g *Gmetric) SendMetricPackets(name string, value string, metricType uint32, units string, slope uint32, ...)
- func (g *Gmetric) SetLogger(l *syslog.Writer)
- func (g *Gmetric) SetVerbose(v bool)
- func (g *Gmetric) TypeToString(t uint32) string
- type GmetricServer
- type PacketType
- type Server
Constants ¶
View Source
const ( SLOPE_ZERO = 0 SLOPE_POSITIVE = 1 SLOPE_NEGATIVE = 2 SLOPE_BOTH = 3 SLOPE_UNSPECIFIED = 4 VALUE_UNKNOWN = 0 VALUE_STRING = 1 VALUE_UNSIGNED_SHORT = 2 VALUE_SHORT = 3 VALUE_UNSIGNED_INT = 4 VALUE_INT = 5 VALUE_FLOAT = 6 VALUE_DOUBLE = 7 PACKET_BOTH = 0 PACKET_META = 1 PACKET_DATA = 2 GROUP = "GROUP" SPOOF_HOST = "SPOOF_HOST" // MAX_PACKET_LENGTH is the maximum allocated length of packets. MAX_PACKET_LENGTH = 512 // MAX_GMETRIC_SERVERS is the maximum number of Ganglia gmetric // receiving instances. MAX_GMETRIC_SERVERS = 16 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gmetric ¶
Gmetric base object, on which all library operations are based.
func (*Gmetric) CloseConnections ¶
CloseConnections closes out the array of UDPConn specified
func (*Gmetric) DebugBuffer ¶
DebugBuffer produces logger data detailing the contents of the passed buffer.
func (*Gmetric) OpenConnections ¶
OpenConnections creates an array of UDPConn objects for the specified servers
func (*Gmetric) SendMetric ¶
func (g *Gmetric) SendMetric(name string, value string, metricType uint32, units string, slope uint32, tmax uint32, dmax uint32, group string)
SendMetric is an API backwards-compatibility wrapper
func (*Gmetric) SendMetricPackets ¶
func (g *Gmetric) SendMetricPackets(name string, value string, metricType uint32, units string, slope uint32, tmax uint32, dmax uint32, group string, packetType PacketType, conn []*net.UDPConn)
SendMetricPackets transmits metric packets using the specified connections.
func (*Gmetric) SetVerbose ¶
SetVerbose sets verbosity of library.
func (*Gmetric) TypeToString ¶
TypeToString converts a type constant, like VALUE_UNKNOWN or VALUE_INT, to its string representation.
Click to show internal directories.
Click to hide internal directories.