kafka

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "kafka"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Brokers            []string      `yaml:"brokers,omitempty" validate:"required"`
	Topic              string        `yaml:"topic,omitempty" validate:"required"`
	GroupId            string        `yaml:"groupId,omitempty" default:"loggie"`
	QueueCapacity      int           `yaml:"queueCapacity" default:"100"`
	MinAcceptedBytes   int           `yaml:"minAcceptedBytes" default:"1"`
	MaxAcceptedBytes   int           `yaml:"maxAcceptedBytes" default:"1024000"`
	ReadMaxAttempts    int           `yaml:"readMaxAttempts" default:"3"`
	MaxReadWait        time.Duration `yaml:"maxPollWait" default:"10s"`
	ReadBackoffMin     time.Duration `yaml:"readBackoffMin" default:"100ms"`
	ReadBackoffMax     time.Duration `yaml:"readBackoffMax" default:"1s"`
	EnableAutoCommit   bool          `yaml:"enableAutoCommit"`
	AutoCommitInterval time.Duration `yaml:"autoCommitInterval" default:"1s"`
	AutoOffsetReset    string        `yaml:"autoOffsetReset" default:"latest" validate:"oneof=earliest latest"`
}

func (*Config) Validate added in v1.1.0

func (c *Config) Validate() error

type Source

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

func (*Source) Category

func (k *Source) Category() api.Category

func (*Source) Commit

func (k *Source) Commit(events []api.Event)

func (*Source) Config

func (k *Source) Config() interface{}

func (*Source) Init

func (k *Source) Init(context api.Context) error

func (*Source) ProductLoop

func (k *Source) ProductLoop(productFunc api.ProductFunc)

func (*Source) Start

func (k *Source) Start() error

func (*Source) Stop

func (k *Source) Stop()

func (*Source) String

func (k *Source) String() string

func (*Source) Type

func (k *Source) Type() api.Type

Jump to

Keyboard shortcuts

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