syslog-kafka: Index | Files

package syslog

import ""


Package Files


type SyslogMessage Uses

type SyslogMessage struct {
    Message   string
    Hostname  string
    Timestamp int64

type SyslogProducer Uses

type SyslogProducer struct {
    // contains filtered or unexported fields

func NewSyslogProducer Uses

func NewSyslogProducer(config *SyslogProducerConfig) *SyslogProducer

func (*SyslogProducer) Start Uses

func (this *SyslogProducer) Start()

func (*SyslogProducer) Stop Uses

func (this *SyslogProducer) Stop()

func (*SyslogProducer) String Uses

func (this *SyslogProducer) String() string

type SyslogProducerConfig Uses

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 Uses

func NewSyslogProducerConfig() *SyslogProducerConfig

Creates an empty SyslogProducerConfig.

Package syslog imports 8 packages (graph) and is imported by 1 packages. Updated 2017-05-22. Refresh now. Tools for package owners.