syslog

package
v0.0.0-...-c8a88b2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyslogMessage

type SyslogMessage struct {
	Message   string
	Hostname  string
	Timestamp int64
}

type SyslogProducer

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

func NewSyslogProducer

func NewSyslogProducer(config *SyslogProducerConfig) *SyslogProducer

func (*SyslogProducer) Start

func (this *SyslogProducer) Start()

func (*SyslogProducer) Stop

func (this *SyslogProducer) Stop()

func (*SyslogProducer) String

func (this *SyslogProducer) String() string

type SyslogProducerConfig

type SyslogProducerConfig struct {
	// Syslog producer config.
	ProducerConfig *producer.ProducerConfig

	// Number of producer instances.
	NumProducers int

	Topic string

	// Receive messages from this TCP address and post them to topic.
	TCPAddr string

	// Receive messages from this UDP address and post them to topic.
	UDPAddr string

	// Kafka Broker List host:port,host:port
	BrokerList string

	// Hostname the message came from
	Hostname string

	Tags map[string]string

	// Transformer func(message syslogparser.LogParts, topic string) *sarama.ProducerMessage
	Transformer func(message *SyslogMessage, topic string) *producer.ProducerRecord

	ValueSerializer producer.Serializer
}

SyslogProducerConfig defines configuration options for SyslogProducer

func NewSyslogProducerConfig

func NewSyslogProducerConfig() *SyslogProducerConfig

Creates an empty SyslogProducerConfig.

Jump to

Keyboard shortcuts

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