kafka

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafka

func NewKafka(l logger.Logger) pubsub.PubSub

NewKafka returns a new kafka pubsub instance.

Types

type Kafka

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

Kafka allows reading/writing to a Kafka consumer group.

func (*Kafka) Close added in v1.0.0

func (k *Kafka) Close() (err error)

func (*Kafka) Features added in v1.0.0

func (k *Kafka) Features() []pubsub.Feature

func (*Kafka) Init

func (k *Kafka) Init(metadata pubsub.Metadata) error

Init does metadata parsing and connection establishment.

func (*Kafka) Publish

func (k *Kafka) Publish(req *pubsub.PublishRequest) error

Publish message to Kafka cluster.

func (*Kafka) Subscribe

func (k *Kafka) Subscribe(req pubsub.SubscribeRequest, handler pubsub.Handler) error

Subscribe to topic in the Kafka cluster This call cannot block like its sibling in bindings/kafka because of where this is invoked in runtime.go.

type OAuthTokenSource added in v1.6.0

type OAuthTokenSource struct {
	CachedToken   oauth2.Token
	Extensions    map[string]string
	TokenEndpoint oauth2.Endpoint
	ClientID      string
	ClientSecret  string
	Scopes        []string
	// contains filtered or unexported fields
}

func (*OAuthTokenSource) Token added in v1.6.0

func (ts *OAuthTokenSource) Token() (*sarama.AccessToken, error)

type SaramaLogBridge added in v1.6.0

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

func (SaramaLogBridge) Print added in v1.6.0

func (b SaramaLogBridge) Print(v ...interface{})

func (SaramaLogBridge) Printf added in v1.6.0

func (b SaramaLogBridge) Printf(format string, v ...interface{})

func (SaramaLogBridge) Println added in v1.6.0

func (b SaramaLogBridge) Println(v ...interface{})

Jump to

Keyboard shortcuts

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