sarama

package
v0.0.0-...-351111d Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Finalize

func Finalize(c *Config) error

Types

type Client

type Client struct {
	sarama.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(servers []string, config *Config) (*Client, error)

type Config

type Config = sarama.Config

func NewConfig

func NewConfig() *Config

type ConsumerGroup

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

func NewConsumerGroup

func NewConsumerGroup(logger logging.Logger, servers []string, groupID string, config *Config, samplerOpts []sampler.Option) (*ConsumerGroup, error)

func (*ConsumerGroup) Close

func (c *ConsumerGroup) Close() error

func (*ConsumerGroup) Consume

func (c *ConsumerGroup) Consume(ctx context.Context, topics []string) error

type SamplerHandler

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

Handler represents a Sarama consumer group consumer

func NewSamplerHandler

func NewSamplerHandler(logger logging.Logger, samplerOpts []sampler.Option) *SamplerHandler

func (*SamplerHandler) Cleanup

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*SamplerHandler) ConsumeClaim

func (h *SamplerHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().

func (*SamplerHandler) Setup

Setup is run at the beginning of a new session, before ConsumeClaim

type XDGSCRAMClient

type XDGSCRAMClient struct {
	*scram.Client
	*scram.ClientConversation
	scram.HashGeneratorFcn
}

func (*XDGSCRAMClient) Begin

func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)

func (*XDGSCRAMClient) Done

func (x *XDGSCRAMClient) Done() bool

func (*XDGSCRAMClient) Step

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Jump to

Keyboard shortcuts

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