Versions in this module Expand all Collapse all v0 v0.1.1 Jan 5, 2021 v0.1.0 Jun 17, 2016 Changes in this version + var ErrProtocolError = errors.New("lumberjack protocol error") + type AsyncClient struct + func AsyncDial(address string, inflight int, opts ...Option) (*AsyncClient, error) + func AsyncDialWith(dial func(network, address string) (net.Conn, error), address string, ...) (*AsyncClient, error) + func NewAsyncClientWith(cl *Client, inflight int) (*AsyncClient, error) + func NewAsyncClientWithConn(c net.Conn, inflight int, opts ...Option) (*AsyncClient, error) + func (c *AsyncClient) Close() error + func (c *AsyncClient) Send(cb AsyncSendCallback, data []interface{}) error + type AsyncSendCallback func(seq uint32, err error) + type Client struct + func Dial(address string, opts ...Option) (*Client, error) + func DialWith(dial func(network, address string) (net.Conn, error), address string, ...) (*Client, error) + func NewWithConn(c net.Conn, opts ...Option) (*Client, error) + func (c *Client) AwaitACK(count uint32) (uint32, error) + func (c *Client) Close() error + func (c *Client) ReceiveACK() (uint32, error) + func (c *Client) Send(data []interface{}) error + type Option func(*options) error + func CompressionLevel(l int) Option + func JSONEncoder(encoder func(interface{}) ([]byte, error)) Option + func Timeout(to time.Duration) Option + type SyncClient struct + func NewSyncClientWith(c *Client) (*SyncClient, error) + func NewSyncClientWithConn(c net.Conn, opts ...Option) (*SyncClient, error) + func SyncDial(address string, opts ...Option) (*SyncClient, error) + func SyncDialWith(dial func(network, address string) (net.Conn, error), address string, ...) (*SyncClient, error) + func (c *SyncClient) Close() error + func (c *SyncClient) Send(data []interface{}) (int, error)