kafka

package
v0.5.0-beta2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PartVarPartitionIDField = "kafkaPartId"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	Decode(message kafka.Message) (message.Message, error)
}

type Publisher

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

func NewPublisher

func NewPublisher(option PublisherOption) *Publisher

func (*Publisher) Publish

func (publisher *Publisher) Publish(ctx context.Context, messages []message.OutputMessage) error

type PublisherOption

type PublisherOption struct {
	WriteConfig WriteConfig
}

type SubscribeOption

type SubscribeOption struct {
	Addr        []string
	Topic       *string
	GroupID     *string
	PartitionID int64
}

func (SubscribeOption) AddAddr

func (option SubscribeOption) AddAddr(addr ...string) SubscribeOption

func (SubscribeOption) SetGroupID

func (option SubscribeOption) SetGroupID(groupID string) SubscribeOption

func (SubscribeOption) SetTopic

func (option SubscribeOption) SetTopic(topic string) SubscribeOption

type Subscriber

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

func NewKafkaSubscriber

func NewKafkaSubscriber(option SubscribeOption) (*Subscriber, error)

func (*Subscriber) Close

func (s *Subscriber) Close() error

func (*Subscriber) Read

type WriteConfig

type WriteConfig = kafka.WriterConfig

Jump to

Keyboard shortcuts

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