Versions in this module Expand all Collapse all v2 v2.0.0 Dec 13, 2023 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) Read(p []byte) (int, error) + func (r *Reader) ReadMessage() (*Message, error) + type TCPReader struct + func (r *TCPReader) Close() + type TCPWriter struct + ExtraFields map[string]interface{} + MaxReconnect int + ReconnectDelay time.Duration + func NewTCPWriter(addr string) (*TCPWriter, error) + func (w *TCPWriter) WithFields(fields map[string]interface{}) + 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 + ExtraFields map[string]interface{} + func NewUDPWriter(addr string) (*UDPWriter, error) + func (w *UDPWriter) WithFields(fields map[string]interface{}) + 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