Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2017 Changes in this version + const GELF_VERSION + const MESSAGE_ID_SIZE + const TCP_NETWORK + const UDP_NETWORK + var CHUNCK_MAGIC_DATA = []byte + var GZIP_MAGIC_PREFIX = []byte + var HEADER_SIZE = len(CHUNCK_MAGIC_DATA) + MESSAGE_ID_SIZE + sequenceInfoSize + var MESSAGE_SEPARATOR = []byte + var UNSUPPORTED_COMPRESSION_TYPE = fmt.Errorf("Unsupported compression type") + type CompressionType string + const COMPRESSION_GZIP + const COMPRESSION_NONE + type GelfClient struct + CompressionLevel int + func NewGelfClient(gelfProtocolClient GelfProtocolClient, compressionType CompressionType) *GelfClient + func (gelfClient *GelfClient) SendMessage(message interface{}) error + type GelfProtocolClient interface + SendMessageData func(messageData MessageData) error + type Message struct + Facility string + File string + FullMessage string + Host string + Level l.Level + Line uint + ShortMessage string + Timestamp float64 + Version string + func NewMessage(source string, level l.Level, shortMessage string) *Message + type MessageData []byte + type MessageId []byte + type TcpClient struct + ServerAddr *net.TCPAddr + func MustTcpClient(host string, port uint16) *TcpClient + func NewTcpClient(host string, port uint16) (*TcpClient, error) + func (tcpClient *TcpClient) SendMessageData(message MessageData) error + type TcpConnMng struct + func DialTcpMng(net string, laddr, raddr *net.TCPAddr) (*TcpConnMng, error) + func (tcpConnMng *TcpConnMng) Close() error + func (tcpConnMng *TcpConnMng) LocalAddr() net.Addr + func (tcpConnMng *TcpConnMng) Read(b []byte) (n int, err error) + func (tcpConnMng *TcpConnMng) RemoteAddr() net.Addr + func (tcpConnMng *TcpConnMng) SetDeadline(t time.Time) error + func (tcpConnMng *TcpConnMng) SetReadDeadline(t time.Time) error + func (tcpConnMng *TcpConnMng) SetWriteDeadline(t time.Time) error + func (tcpConnMng *TcpConnMng) Write(b []byte) (n int, err error) + type UdpClient struct + ChunkSize uint + ServerAddr *net.UDPAddr + func MustUdpClient(host string, port uint16, chunkSize uint) *UdpClient + func NewUdpClient(host string, port uint16, chunkSize uint) (*UdpClient, error) + func (udpClient *UdpClient) SendMessageData(messageData MessageData) error