fluent

package module
v0.0.0-...-ec11ceb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 6 Imported by: 0

README

gofluent

gofluent is a Fluentd client for Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts Options) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Send

func (c *Client) Send(tag string, v interface{})

Send sends record v with given tag. v can be any type which can be encoded to msgpack. Specially, if type of v is []byte, it will be sent without any modification.

func (*Client) SendWithTime

func (c *Client) SendWithTime(tag string, t time.Time, v interface{})

SendWithTime sends record v with given tag and time. See Send.

type ErrorHandler

type ErrorHandler interface {
	HandleError(error)
}

type ErrorHandlerFunc

type ErrorHandlerFunc func(error)

func (ErrorHandlerFunc) HandleError

func (f ErrorHandlerFunc) HandleError(err error)

type Options

type Options struct {
	Addr           string
	TagPrefix      string
	SendBufSize    int
	ErrorBufSize   int
	ErrorHandler   ErrorHandler
	LogHandler     func(string, ...interface{})
	DialTimeout    time.Duration
	CloseTimeout   time.Duration
	Timeout        time.Duration
	RetryWait      time.Duration
	MaxBackoff     int
	MaxPendingSize int
	IsFluxion      bool

	// If NonBlocking is true and send buffer is full, further events will be dropped.
	NonBlocking bool
}

func (*Options) Default

func (o *Options) Default()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL