Documentation ¶
Index ¶
- type Item
- type LogzioSender
- type Sender
- type SenderOptionFunc
- func SetCheckDiskSpace(check bool) SenderOptionFunc
- func SetCompress(b bool) SenderOptionFunc
- func SetDebug(debug io.Writer) SenderOptionFunc
- func SetDrainDiskThreshold(th int) SenderOptionFunc
- func SetDrainDuration(duration time.Duration) SenderOptionFunc
- func SetHttpClient(client *http.Client) SenderOptionFunc
- func SetInMemoryQueue(b bool) SenderOptionFunc
- func SetTempDirectory(dir string) SenderOptionFunc
- func SetUrl(url string) SenderOptionFunc
- func SetinMemoryCapacity(size uint64) SenderOptionFunc
- func SetlogCountLimit(limit int) SenderOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogzioSender ¶
type LogzioSender struct {
// contains filtered or unexported fields
}
LogzioSender instance of the
func New ¶
func New(token string, options ...SenderOptionFunc) (*LogzioSender, error)
New creates a new Logzio sender with a token and options
func (*LogzioSender) CloseIdleConnections ¶
func (l *LogzioSender) CloseIdleConnections()
CloseIdleConnections to close all remaining open connections
func (*LogzioSender) Send ¶
func (l *LogzioSender) Send(payload []byte) error
Send the payload to logz.io
func (*LogzioSender) Stop ¶
func (l *LogzioSender) Stop()
Stop will close the LevelDB queue and do a final drain
type SenderOptionFunc ¶
type SenderOptionFunc func(*LogzioSender) error
SenderOptionFunc options for logz
func SetCheckDiskSpace ¶
func SetCheckDiskSpace(check bool) SenderOptionFunc
SetCheckDiskSpace to check if it crosses the maximum allowed disk usage
func SetCompress ¶
func SetCompress(b bool) SenderOptionFunc
func SetDebug ¶
func SetDebug(debug io.Writer) SenderOptionFunc
SetDebug mode and send logs to this writer
func SetDrainDiskThreshold ¶
func SetDrainDiskThreshold(th int) SenderOptionFunc
SetDrainDiskThreshold to change the maximum used disk space
func SetDrainDuration ¶
func SetDrainDuration(duration time.Duration) SenderOptionFunc
SetDrainDuration to change the interval between drains
func SetHttpClient ¶
func SetHttpClient(client *http.Client) SenderOptionFunc
SetHttpClient to change the default http client
func SetInMemoryQueue ¶
func SetInMemoryQueue(b bool) SenderOptionFunc
SetInMemoryQueue to change the default disk queue
func SetTempDirectory ¶
func SetTempDirectory(dir string) SenderOptionFunc
SetTempDirectory Use this temporary dir
func SetUrl ¶
func SetUrl(url string) SenderOptionFunc
SetUrl set the url which maybe different from the defaultUrl
func SetinMemoryCapacity ¶
func SetinMemoryCapacity(size uint64) SenderOptionFunc
SetinMemoryCapacity to change the default capacity
func SetlogCountLimit ¶
func SetlogCountLimit(limit int) SenderOptionFunc
SetlogCountLimit to change the default limit