kafka

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithBootstrapServers

func WithBootstrapServers(s string) Option

func WithConfigMap

func WithConfigMap(configMap kafka.ConfigMap) Option

func WithDefaultTopic

func WithDefaultTopic(s string) Option

func WithGracePeriod

func WithGracePeriod(t time.Duration) Option

func WithTopicMappings

func WithTopicMappings(topicMappings config.TopicMappings) Option

func WithWorkers

func WithWorkers(v int) Option

type Publisher

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

func New

func New(logger log.Logger, _ *prometheus.Registry, opts ...Option) (*Publisher, error)

func (*Publisher) Close

func (s *Publisher) Close() error

func (Publisher) Name

func (s Publisher) Name() string

func (*Publisher) Publish

func (s *Publisher) Publish(ctx context.Context, request *apis.PublishRequest) (*apis.PublishResponse, error)

func (*Publisher) PublishAsync

func (s *Publisher) PublishAsync(_ context.Context, request *apis.PublishRequest, callback apis.PublishCallbackFunc) error

func (*Publisher) Serve

func (s *Publisher) Serve() error

func (*Publisher) Shutdown

func (s *Publisher) Shutdown(err error)

Jump to

Keyboard shortcuts

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