kafka

package
v0.0.0-...-fbbe22e Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SASLMechanismPlain = "PLAIN"
)

Variables

This section is empty.

Functions

func Brokers

func Brokers(o obs.OutputSpec) string

Brokers returns the list of broker endpoints of a Kafka cluster. The list represents only the initial set used by the collector's Kafka client for the first connection only. The collector's Kafka client fetches constantly an updated list from Kafka. These updates are not reconciled back to the collector configuration. The list of brokers are populated from the Kafka OutputSpec `Brokers` field, a list of valid URLs. If none provided the target URL from the OutputSpec is used as fallback. Finally, if neither approach works the current collector process will be terminated.

func New

func New(id string, o obs.OutputSpec, inputs []string, secrets observability.Secrets, strategy common.ConfigStrategy, op Options) []Element

func SASLConf

func SASLConf(id string, spec *obs.KafkaAuthentication, secrets observability.Secrets) Element

func Topics

func Topics(o obs.OutputSpec) string

Topic returns the name of an existing kafka topic. The kafka topic is either extracted from the kafka OutputSpec `Topic` field in a multiple broker setup or as a fallback from the OutputSpec URL if provided as a host path. Defaults to `topic`.

Types

type InsecureTLS

type InsecureTLS struct {
	ComponentID string
}

func (InsecureTLS) Name

func (i InsecureTLS) Name() string

func (InsecureTLS) Template

func (i InsecureTLS) Template() string

type Kafka

type Kafka struct {
	ComponentID      string
	Inputs           string
	BootstrapServers string
	Topic            string
	common.RootMixin
}

func (Kafka) Name

func (k Kafka) Name() string

func (*Kafka) SetCompression

func (k *Kafka) SetCompression(algo string)

func (Kafka) Template

func (k Kafka) Template() string

type SASL

type SASL struct {
	ComponentID string
	Username    string
	Password    string
	Mechanism   string
}

func (SASL) Name

func (t SASL) Name() string

func (SASL) Template

func (t SASL) Template() string

Jump to

Keyboard shortcuts

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