broker

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package broker contains data types, interfaces, and methods related to brokers that can be used to consume input messages by aggegator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaramaConfigFromBrokerConfig added in v1.2.7

func SaramaConfigFromBrokerConfig(cfg Configuration) (*sarama.Config, error)

SaramaConfigFromBrokerConfig returns a Config struct from broker.Configuration parameters

Types

type Configuration

type Configuration struct {
	Addresses                        string        `mapstructure:"addresses" toml:"addresses"`
	SecurityProtocol                 string        `mapstructure:"security_protocol" toml:"security_protocol"`
	CertPath                         string        `mapstructure:"cert_path" toml:"cert_path"`
	SaslMechanism                    string        `mapstructure:"sasl_mechanism" toml:"sasl_mechanism"`
	SaslUsername                     string        `mapstructure:"sasl_username" toml:"sasl_username"`
	SaslPassword                     string        `mapstructure:"sasl_password" toml:"sasl_password"`
	Topic                            string        `mapstructure:"topic" toml:"topic"`
	Timeout                          time.Duration `mapstructure:"timeout" toml:"timeout"`
	PayloadTrackerTopic              string        `mapstructure:"payload_tracker_topic" toml:"payload_tracker_topic"`
	DeadLetterQueueTopic             string        `mapstructure:"dead_letter_queue_topic" toml:"dead_letter_queue_topic"`
	ServiceName                      string        `mapstructure:"service_name" toml:"service_name"`
	Group                            string        `mapstructure:"group" toml:"group"`
	Enabled                          bool          `mapstructure:"enabled" toml:"enabled"`
	OrgAllowlist                     mapset.Set    `mapstructure:"org_allowlist_file" toml:"org_allowlist_file"`
	OrgAllowlistEnabled              bool          `mapstructure:"enable_org_allowlist" toml:"enable_org_allowlist"`
	ClientID                         string        `mapstructure:"client_id" toml:"client_id"`
	DisplayMessageWithWrongStructure bool          `mapstructure:"display_message_with_wrong_structure" toml:"display_message_with_wrong_structure"`
}

Configuration represents configuration of Kafka broker

type SCRAMClient added in v1.4.0

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

SCRAMClient implementation for the SCRAM authentication

func (*SCRAMClient) Begin added in v1.4.0

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

Begin prepares the client for the SCRAM exchange

func (*SCRAMClient) Done added in v1.4.0

func (x *SCRAMClient) Done() bool

Done should return true when the SCRAM conversation is over.

func (*SCRAMClient) Step added in v1.4.0

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

Step steps client through the SCRAM exchange

Jump to

Keyboard shortcuts

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