Documentation ¶
Index ¶
- type LogzioSender
- type Sender
- type SenderOptionFunc
- func SetCheckDiskSpace(check bool) SenderOptionFunc
- func SetDebug(debug io.Writer) SenderOptionFunc
- func SetDrainDiskThreshold(th int) SenderOptionFunc
- func SetDrainDuration(duration time.Duration) SenderOptionFunc
- func SetTempDirectory(dir string) SenderOptionFunc
- func SetUrl(url string) 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 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 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
Click to show internal directories.
Click to hide internal directories.