kafka

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 14 Imported by: 2

README

Working with string encoder

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultKafkaBroker = "127.0.0.1:9092"
	DefaultLogger      = logrus.NewLogrusLogger()
)
View Source
var (
	DefaultBrokerConfig  = sarama.NewConfig()
	DefaultClusterConfig = sarama.NewConfig()
)

Functions

func BrokerConfig

func BrokerConfig(c *sarama.Config) broker.BrokerOption

func ClusterConfig

func ClusterConfig(c *sarama.Config) broker.BrokerOption

func CreateKafkaBroker added in v1.0.0

func CreateKafkaBroker(cfg *KafkaBrokerConfig, opts ...broker.BrokerOption) (broker.Broker, error)

func NewKafkaBroker

func NewKafkaBroker(opts ...broker.BrokerOption) broker.Broker

func SubscribeConfig

func SubscribeConfig(c *sarama.Config) broker.SubscribeOption

func SubscribeContext

func SubscribeContext(ctx context.Context) broker.SubscribeOption

SubscribeContext set the context for broker.SubscribeOption

Types

type KafkaBrokerConfig

type KafkaBrokerConfig struct {
	Addresses     []string
	ConsumerGroup string

	SASLEnabled   bool
	SASLUser      string
	SASLPassword  string
	SASLHandshake bool
	SASLAlgorithm string

	TLSEnabled        bool
	TLSSkipVerify     bool
	TLSClientCertFile string
	TLSClientKeyFile  string
	TLSCaCertFile     string
}

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