Documentation
¶
Overview ¶
A Riemann client for Go, featuring concurrency, sending events and state updates, queries, and feature parity with the reference implementation written in Ruby.
Copyright (C) 2014 by Christopher Gilbert <christopher.john.gilbert@gmail.com>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventToProtocolBuffer ¶
EventToProtocolBuffer converts an Event type to a proto.Event
Types ¶
type Event ¶
type Event struct {
Ttl float32
Time int64
Tags []string
Host string // Defaults to os.Hostname()
State string
Service string
Metric interface{} // Could be Int, Float32, Float64
Description string
Attributes map[string]string
}
Event is a wrapper for Riemann events
func ProtocolBuffersToEvents ¶
ProtocolBuffersToEvents converts an array of proto.Event to an array of Event
type GorymanClient ¶
type GorymanClient struct {
// contains filtered or unexported fields
}
GorymanClient is a client library to send events to Riemann
func NewGorymanClient ¶
func NewGorymanClient(addr string) *GorymanClient
NewGorymanClient - Factory
func (*GorymanClient) Connect ¶
func (c *GorymanClient) Connect() error
Connect creates a UDP and TCP connection to a Riemann server
func (*GorymanClient) SendState ¶
func (c *GorymanClient) SendState(s *State) error
Send a state update
type State ¶
type State struct {
Ttl float32
Time int64
Tags []string
Host string // Defaults to os.Hostname()
State string
Service string
Once bool
Metric interface{} // Could be Int, Float32, Float64
Description string
Attributes map[string]string
}
State is a wrapper for Riemann states
