Versions in this module Expand all Collapse all v0 v0.6.1 Feb 20, 2020 Changes in this version + const MaxUDPSize + func EventToProtocolBuffer(event *Event) (*proto.Event, error) + func GetTLSConfig(serverName string, certPath string, keyPath string, insecure bool) (*tls.Config, error) + func SendEvent(c Client, e *Event) (*proto.Msg, error) + func SendEvents(c Client, e *[]Event) (*proto.Msg, error) + type Client interface + Close func() error + Connect func() error + Send func(message *proto.Msg) (*proto.Msg, error) + type Event struct + Attributes map[string]string + Description string + Host string + Metric interface{} + Service string + State string + TTL time.Duration + Tags []string + Time time.Time + func ProtocolBuffersToEvents(pbEvents []*proto.Event) []Event + type IndexClient interface + QueryIndex func(q string) ([]Event, error) + type TCPClient struct + func NewTCPClient(addr string, timeout time.Duration) *TCPClient + func NewTLSClient(addr string, tlsConfig *tls.Config, timeout time.Duration) (*TCPClient, error) + func (c *TCPClient) Close() error + func (c *TCPClient) Connect() error + func (c *TCPClient) QueryIndex(q string) ([]Event, error) + func (c *TCPClient) Send(message *proto.Msg) (*proto.Msg, error) + type UDPClient struct + func NewUDPClient(addr string, timeout time.Duration) *UDPClient + func (c *UDPClient) Close() error + func (c *UDPClient) Connect() error + func (c *UDPClient) Send(message *proto.Msg) (*proto.Msg, error)