kafka

package
v0.0.0-...-4721b77 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(conf *AppConfig) (err error)

Types

type AppConfig

type AppConfig struct {
	KafkaBrokers string
	Group        string
	Version      string
	Topics       string
	Assignor     string
	Strategy     string
	Oldest       bool
}

AppConfig - Structure with application configuration data

type Consumer

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

Consumer represents a Sarama consumer group consumer

func (*Consumer) Cleanup

func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*Consumer) ConsumeClaim

func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().

func (*Consumer) Setup

func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error

Setup is run at the beginning of a new session, before ConsumeClaim Mark the consumer as ready

type FlowToExport

type FlowToExport struct {
	TimeFlowStart time.Time                 `json:"start"`
	FlowType      flow.FlowMessage_FlowType `json:"type"`
	SamplingRate  []byte                    `json:"sampling"`
	Srcipstr      string                    `json:"src_ip"`
	Dstipstr      string                    `json:"dst_ip"`
	Bytes         uint64                    `json:"bytes"`
	Packets       uint64                    `json:"packets"`
	SrcPort       uint32                    `json:"src_port"`
	DstPort       uint32                    `json:"dst_port"`
	Etype         uint32                    `json:"etype"`
	Protocol      uint32                    `json:"proto"`
	SrcAS         uint32                    `json:"src_as"`
	DstAS         uint32                    `json:"dst_as"`
}

Jump to

Keyboard shortcuts

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