drains

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLogSize int = 99990

Variables

This section is empty.

Functions

func CloseAll

func CloseAll()

func DrainCount

func DrainCount(Url string) (int, error)

func Init

func Init()

func PrintMetrics

func PrintMetrics()

func Undial

func Undial(Id string, Url string) error

Types

type Drain

type Drain interface {
	Init(Id string, Url string) error
	Flush()
	PrintMetrics()
	Packets() chan syslog.Packet
	Id() string
	Url() string
	Close()
}

func Dial

func Dial(Id string, Url string) (Drain, error)

type HttpDrain

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

func (*HttpDrain) Close

func (l *HttpDrain) Close()

func (*HttpDrain) Flush

func (l *HttpDrain) Flush()

func (*HttpDrain) Id

func (l *HttpDrain) Id() string

func (*HttpDrain) Init

func (l *HttpDrain) Init(Id string, Url string) error

func (*HttpDrain) Packets

func (l *HttpDrain) Packets() chan syslog.Packet

func (*HttpDrain) PrintMetrics

func (l *HttpDrain) PrintMetrics()

func (*HttpDrain) Url

func (l *HttpDrain) Url() string

type SyslogDrain

type SyslogDrain struct {
	MaxConnections uint32

	Attempting uint32
	Sent       uint32
	Mutex      *sync.Mutex
	Pressure   float64
	// contains filtered or unexported fields
}

func (*SyslogDrain) Close

func (p *SyslogDrain) Close()

func (*SyslogDrain) Flush

func (p *SyslogDrain) Flush()

func (*SyslogDrain) Id

func (l *SyslogDrain) Id() string

func (*SyslogDrain) Init

func (p *SyslogDrain) Init(Id string, DestinationUrl string) error

func (*SyslogDrain) OpenConnections

func (p *SyslogDrain) OpenConnections() uint32

func (*SyslogDrain) Packets

func (l *SyslogDrain) Packets() chan syslog.Packet

func (*SyslogDrain) PrintMetrics

func (p *SyslogDrain) PrintMetrics()

func (*SyslogDrain) Url

func (l *SyslogDrain) Url() string

Jump to

Keyboard shortcuts

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