Documentation
¶
Index ¶
- func NewChunkMessage(ref [][]byte, listener *Listener, id [8]byte, sid []byte) *chunkMessage
- type ConnPoolInterface
- func NewConnPool(noClientAuth bool, tries int, address *GraylogHost, ca, crt, pem string, ...) (ConnPoolInterface, error)
- func NewHttpConnPool(tries int, host *GraylogHost, logger *logger.Logger) (ConnPoolInterface, error)
- func NewHttpsConnPool(tries int, host *GraylogHost, ca, crt, pem string, logger *logger.Logger) (ConnPoolInterface, error)
- func NewTcpConnPool(tries int, host *GraylogHost, logger *logger.Logger) (ConnPoolInterface, error)
- func NewTcpTlsConnPool(tries int, address *GraylogHost, ca, crt, pem string, logger *logger.Logger) (ConnPoolInterface, error)
- type ConnQueueItem
- type FatalError
- type GraylogHost
- type HttpConnPool
- type HttpsConnPool
- type Listener
- type TcpConnPool
- type TcpTlsConnPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnPoolInterface ¶
type ConnPoolInterface interface { // Close will close all connection // and all the open channels Close() // Wait will block till all workers // are finished (most times this is // when queue is empty/finished) Wait() // Start will start the workers in // the background to catch new // package forwards Start(workers int) // Push will create a non-blocking // queue item that can be later check Push(data []byte, id []byte) *ConnQueueItem // will write the given bytes to // the remote and block until we // we get some feedback Write(data []byte) (int, error) }
func NewConnPool ¶
func NewConnPool(noClientAuth bool, tries int, address *GraylogHost, ca, crt, pem string, logger *logger.Logger) (ConnPoolInterface, error)
func NewHttpConnPool ¶
func NewHttpConnPool(tries int, host *GraylogHost, logger *logger.Logger) (ConnPoolInterface, error)
func NewHttpsConnPool ¶
func NewHttpsConnPool(tries int, host *GraylogHost, ca, crt, pem string, logger *logger.Logger) (ConnPoolInterface, error)
func NewTcpConnPool ¶
func NewTcpConnPool(tries int, host *GraylogHost, logger *logger.Logger) (ConnPoolInterface, error)
func NewTcpTlsConnPool ¶
func NewTcpTlsConnPool(tries int, address *GraylogHost, ca, crt, pem string, logger *logger.Logger) (ConnPoolInterface, error)
type ConnQueueItem ¶
type ConnQueueItem struct {
// contains filtered or unexported fields
}
func (ConnQueueItem) HasError ¶
func (c ConnQueueItem) HasError() bool
HasError will check if we got a error
func (ConnQueueItem) Tries ¶
func (c ConnQueueItem) Tries() int
Tries will return a int representing the amount of tries when successfully was delivered, stopped because of error or reached max retries
func (ConnQueueItem) Wait ¶
func (c ConnQueueItem) Wait()
Wait will block until queue item is processed
type FatalError ¶
type FatalError struct {
// contains filtered or unexported fields
}
func (*FatalError) Error ¶
func (f *FatalError) Error() string
type GraylogHost ¶
type GraylogHost struct {
// contains filtered or unexported fields
}
func NewGraylogHost ¶
func NewGraylogHost(host string) *GraylogHost
func (GraylogHost) GetHost ¶
func (g GraylogHost) GetHost() string
func (GraylogHost) GetNetwork ¶
func (g GraylogHost) GetNetwork() string
func (GraylogHost) IsSecure ¶
func (g GraylogHost) IsSecure() bool
func (GraylogHost) String ¶
func (g GraylogHost) String() string
type HttpConnPool ¶
type HttpConnPool struct {
// contains filtered or unexported fields
}
func (HttpConnPool) Close ¶
func (p HttpConnPool) Close()
func (*HttpConnPool) Push ¶
func (c *HttpConnPool) Push(d []byte, id []byte) *ConnQueueItem
func (HttpConnPool) Start ¶
func (p HttpConnPool) Start(workers int)
type HttpsConnPool ¶
type HttpsConnPool struct { HttpConnPool // contains filtered or unexported fields }
func (*HttpsConnPool) Push ¶
func (c *HttpsConnPool) Push(d []byte, id []byte) *ConnQueueItem
func (HttpsConnPool) Start ¶
func (p HttpsConnPool) Start(workers int)
type Listener ¶
type Listener struct { Done chan interface{} // contains filtered or unexported fields }
func NewListener ¶
NewListener is wrapper around the gelf protocol for connectionless protocols, udp, unixgram or ip
type TcpConnPool ¶
type TcpConnPool struct {
// contains filtered or unexported fields
}
func (*TcpConnPool) Start ¶
func (c *TcpConnPool) Start(workers int)
type TcpTlsConnPool ¶
type TcpTlsConnPool struct {
// contains filtered or unexported fields
}
func (*TcpTlsConnPool) Start ¶
func (c *TcpTlsConnPool) Start(workers int)
Click to show internal directories.
Click to hide internal directories.