Documentation ¶
Index ¶
- Variables
- type HermesClient
- func (c *HermesClient) DecrementGauge(metricName string, labels map[string]string)
- func (c *HermesClient) IncrementCounter(metricName string, labels map[string]string)
- func (c *HermesClient) IncrementGauge(metricName string, labels map[string]string)
- func (c *HermesClient) ObserveHistogram(metricName string, labels map[string]string, observation float64)
- func (c *HermesClient) ObserveSummary(metricName string, labels map[string]string, observation float64)
- func (c *HermesClient) SendUDPPacket(packet interface{}) error
- func (c *HermesClient) SetGauge(metricName string, labels map[string]string, gaugeValue float64)
- type HermesCounterPacket
- type HermesCounterPayload
- type HermesGaugePacket
- type HermesGaugePayload
- type HermesHistogramPacket
- type HermesHistogramPayload
- type HermesSummaryPacket
- type HermesSummaryPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // define custom errors ErrHermesConnection = errors.New("Cannot connect to hermes server") ErrHermesPacketJSON = errors.New("Unable to convert hermes udp packet to JSON format") )
Functions ¶
This section is empty.
Types ¶
type HermesClient ¶
struct used to container hermes client details
func New ¶
func New(host string, port int) *HermesClient
function used to generate new hermes client
func (*HermesClient) DecrementGauge ¶
func (c *HermesClient) DecrementGauge(metricName string, labels map[string]string)
function used to decrement gauge value
func (*HermesClient) IncrementCounter ¶
func (c *HermesClient) IncrementCounter(metricName string, labels map[string]string)
function used to increment counter value
func (*HermesClient) IncrementGauge ¶
func (c *HermesClient) IncrementGauge(metricName string, labels map[string]string)
function used to increment gauge value
func (*HermesClient) ObserveHistogram ¶
func (c *HermesClient) ObserveHistogram(metricName string, labels map[string]string, observation float64)
function used to make an observation on a histogram metric
func (*HermesClient) ObserveSummary ¶
func (c *HermesClient) ObserveSummary(metricName string, labels map[string]string, observation float64)
function used to make an observation on a summary metric
func (*HermesClient) SendUDPPacket ¶
func (c *HermesClient) SendUDPPacket(packet interface{}) error
define function used to send UDP packet to Hermes server. UDP Packets are converted to JSON before send
type HermesCounterPacket ¶
type HermesCounterPacket struct { MetricName string `json:"metric_name"` Payload HermesCounterPayload `json:"payload"` }
type HermesCounterPayload ¶
type HermesGaugePacket ¶
type HermesGaugePacket struct { MetricName string `json:"metric_name"` Payload HermesGaugePayload `json:"payload"` }
type HermesGaugePayload ¶
type HermesHistogramPacket ¶
type HermesHistogramPacket struct { MetricName string `json:"metric_name"` Payload HermesHistogramPayload `json:"payload"` }
type HermesHistogramPayload ¶
type HermesSummaryPacket ¶
type HermesSummaryPacket struct { MetricName string `json:"metric_name"` Payload HermesSummaryPayload `json:"payload"` }
type HermesSummaryPayload ¶
Click to show internal directories.
Click to hide internal directories.