Documentation ¶
Index ¶
- type PandoraReqBody
- type PandoraSender
- func (l *PandoraSender) CloseIdleConnections()
- func (l *PandoraSender) Drain()
- func (l *PandoraSender) Send(payload []byte) error
- func (l *PandoraSender) SendData(body PandoraReqBody) error
- func (l *PandoraSender) Stop()
- func (l *PandoraSender) Sync() error
- func (l *PandoraSender) Write(p []byte) (n int, err error)
- 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 PandoraReqBody ¶
type PandoraSender ¶
type PandoraSender struct {
// contains filtered or unexported fields
}
PandoraSender instance of the
func New ¶
func New(token string, options ...SenderOptionFunc) (*PandoraSender, error)
New creates a new Pandora sender with a token and options
func (*PandoraSender) CloseIdleConnections ¶
func (l *PandoraSender) CloseIdleConnections()
CloseIdleConnections to close all remaining open connections
func (*PandoraSender) Send ¶
func (l *PandoraSender) Send(payload []byte) error
Send the payload to Pandora
func (*PandoraSender) SendData ¶
func (l *PandoraSender) SendData(body PandoraReqBody) error
Send reqbody to Pandora
func (*PandoraSender) Stop ¶
func (l *PandoraSender) Stop()
Stop will close the LevelDB queue and do a final drain
type SenderOptionFunc ¶
type SenderOptionFunc func(*PandoraSender) error
SenderOptionFunc options for sender
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.