Documentation
¶
Overview ¶
A Riemann client for Go, featuring concurrency, sending events and state updates, queries
Copyright (C) 2014 by Christopher Gilbert <christopher.john.gilbert@gmail.com>
Index ¶
Constants ¶
const MAX_UDP_SIZE = 16384
MAX_UDP_SIZE is the maximum allowed size of a UDP packet before automatically failing the send
Variables ¶
This section is empty.
Functions ¶
func EventToProtocolBuffer ¶
convert an event to a protobuf Event
Types ¶
type Client ¶
type Client interface {
Send(message *proto.Msg) (*proto.Msg, error)
Connect(timeout int32) error
Close() error
}
Client is an interface to a generic client
type Event ¶
type Event struct {
Ttl float32
Time time.Time
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 ¶
converts an array of proto.Event to an array of Event
type IndexClient ¶
IndexClient is an interface to a generic Client for index queries
type TcpClient ¶
type TcpClient struct {
// contains filtered or unexported fields
}
TcpClient is a type that implements the Client interface
func (*TcpClient) QueryIndex ¶
Query the server for events using the client
type TlsClient ¶
type TlsClient struct {
// contains filtered or unexported fields
}
TlsClient is a type that implements the Client interface
func NewTlsClient ¶
NewTlsClient - Factory
func (*TlsClient) QueryIndex ¶
Query the server for events using the client