Versions in this module Expand all Collapse all v2 v2.0.1 Apr 21, 2022 Changes in this version + const ChunkSize + const DefaultMaxReconnect + const DefaultReconnectDelay + const LOG_ALERT + const LOG_CRIT + const LOG_DEBUG + const LOG_EMERG + const LOG_ERR + const LOG_INFO + const LOG_NOTICE + const LOG_WARNING + type CompressType int + const CompressGzip + const CompressNone + const CompressZlib + type GelfWriter struct + Facility string + func (w *GelfWriter) Close() error + type Message struct + Extra map[string]interface{} + Facility string + Full string + Host string + Level int32 + RawExtra json.RawMessage + Short string + TimeUnix float64 + Version string + func (m *Message) MarshalJSONBuf(buf *bytes.Buffer) error + func (m *Message) UnmarshalJSON(data []byte) error + type Reader struct + func NewReader(addr string) (*Reader, error) + func (r *Reader) Addr() string + func (r *Reader) Close() error + func (r *Reader) Read(p []byte) (int, error) + func (r *Reader) ReadMessage() (*Message, error) + type TCPReader struct + func (r *TCPReader) Close() + type TCPWriter struct + MaxReconnect int + ReconnectDelay time.Duration + func NewTCPWriter(addr string) (*TCPWriter, error) + func (w *TCPWriter) Write(p []byte) (n int, err error) + func (w *TCPWriter) WriteMessage(m *Message) (err error) + type UDPWriter struct + CompressionLevel int + CompressionType CompressType + func NewUDPWriter(addr string) (*UDPWriter, error) + func (w *UDPWriter) Write(p []byte) (n int, err error) + func (w *UDPWriter) WriteMessage(m *Message) (err error) + type Writer interface + Close func() error + Write func([]byte) (int, error) + WriteMessage func(*Message) error