kafka

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 14 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"` // reserved for compatibility
	Topics             []string       `yaml:"topics,omitempty"`
	GroupId            string         `yaml:"groupId,omitempty" default:"loggie"`
	ClientId           string         `yaml:"clientId,omitempty"`
	Worker             int            `yaml:"worker,omitempty" default:"1"`
	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"`
	SASL               kafkaSink.SASL `yaml:"sasl,omitempty"`
	AddonMeta          *bool          `yaml:"addonMeta,omitempty" default:"true"`
}

func (*Config) SetDefaults added in v1.5.0

func (c *Config) SetDefaults()

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