kafka

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kafka provides an otelcol.receiver.kafka component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSMSKArguments

type AWSMSKArguments struct {
	Region     string `alloy:"region,attr"`
	BrokerAddr string `alloy:"broker_addr,attr"`
}

AWSMSKArguments exposes additional SASL authentication measures required to use the AWS_MSK_IAM mechanism.

func (AWSMSKArguments) Convert

func (args AWSMSKArguments) Convert() map[string]interface{}

Convert converts args into the upstream type.

type Arguments

type Arguments struct {
	Brokers         []string `alloy:"brokers,attr"`
	ProtocolVersion string   `alloy:"protocol_version,attr"`
	Topic           string   `alloy:"topic,attr,optional"`
	Encoding        string   `alloy:"encoding,attr,optional"`
	GroupID         string   `alloy:"group_id,attr,optional"`
	ClientID        string   `alloy:"client_id,attr,optional"`
	InitialOffset   string   `alloy:"initial_offset,attr,optional"`

	ResolveCanonicalBootstrapServersOnly bool `alloy:"resolve_canonical_bootstrap_servers_only,attr,optional"`

	Authentication   AuthenticationArguments `alloy:"authentication,block,optional"`
	Metadata         MetadataArguments       `alloy:"metadata,block,optional"`
	AutoCommit       AutoCommitArguments     `alloy:"autocommit,block,optional"`
	MessageMarking   MessageMarkingArguments `alloy:"message_marking,block,optional"`
	HeaderExtraction HeaderExtraction        `alloy:"header_extraction,block,optional"`

	// DebugMetrics configures component internal metrics. Optional.
	DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"`

	// Output configures where to send received data. Required.
	Output *otelcol.ConsumerArguments `alloy:"output,block"`
}

Arguments configures the otelcol.receiver.kafka component.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements receiver.Arguments.

func (Arguments) DebugMetricsConfig

func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments

DebugMetricsConfig implements receiver.Arguments.

func (Arguments) Exporters

Exporters implements receiver.Arguments.

func (Arguments) Extensions

func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension

Extensions implements receiver.Arguments.

func (Arguments) NextConsumers

func (args Arguments) NextConsumers() *otelcol.ConsumerArguments

NextConsumers implements receiver.Arguments.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

type AuthenticationArguments

type AuthenticationArguments struct {
	Plaintext *PlaintextArguments         `alloy:"plaintext,block,optional"`
	SASL      *SASLArguments              `alloy:"sasl,block,optional"`
	TLS       *otelcol.TLSClientArguments `alloy:"tls,block,optional"`
	Kerberos  *KerberosArguments          `alloy:"kerberos,block,optional"`
}

AuthenticationArguments configures how to authenticate to the Kafka broker.

func (AuthenticationArguments) Convert

func (args AuthenticationArguments) Convert() map[string]interface{}

Convert converts args into the upstream type.

type AutoCommitArguments

type AutoCommitArguments struct {
	Enable   bool          `alloy:"enable,attr,optional"`
	Interval time.Duration `alloy:"interval,attr,optional"`
}

AutoCommitArguments configures how to automatically commit updated topic offsets back to the Kafka broker.

func (AutoCommitArguments) Convert

Convert converts args into the upstream type.

func (*AutoCommitArguments) SetToDefault

func (args *AutoCommitArguments) SetToDefault()

type HeaderExtraction

type HeaderExtraction struct {
	ExtractHeaders bool     `alloy:"extract_headers,attr,optional"`
	Headers        []string `alloy:"headers,attr,optional"`
}

func (HeaderExtraction) Convert

Convert converts HeaderExtraction into the upstream type.

func (*HeaderExtraction) SetToDefault

func (h *HeaderExtraction) SetToDefault()

type KerberosArguments

type KerberosArguments struct {
	ServiceName string            `alloy:"service_name,attr,optional"`
	Realm       string            `alloy:"realm,attr,optional"`
	UseKeyTab   bool              `alloy:"use_keytab,attr,optional"`
	Username    string            `alloy:"username,attr"`
	Password    alloytypes.Secret `alloy:"password,attr,optional"`
	ConfigPath  string            `alloy:"config_file,attr,optional"`
	KeyTabPath  string            `alloy:"keytab_file,attr,optional"`
}

KerberosArguments configures Kerberos authentication against the Kafka broker.

func (KerberosArguments) Convert

func (args KerberosArguments) Convert() map[string]interface{}

Convert converts args into the upstream type.

type MessageMarkingArguments

type MessageMarkingArguments struct {
	AfterExecution      bool `alloy:"after_execution,attr,optional"`
	IncludeUnsuccessful bool `alloy:"include_unsuccessful,attr,optional"`
}

MessageMarkingArguments configures when Kafka messages are marked as read.

func (MessageMarkingArguments) Convert

Convert converts args into the upstream type.

func (*MessageMarkingArguments) SetToDefault

func (args *MessageMarkingArguments) SetToDefault()

type MetadataArguments

type MetadataArguments struct {
	IncludeAllTopics bool                   `alloy:"include_all_topics,attr,optional"`
	Retry            MetadataRetryArguments `alloy:"retry,block,optional"`
}

MetadataArguments configures how the otelcol.receiver.kafka component will retrieve metadata from the Kafka broker.

func (MetadataArguments) Convert

func (args MetadataArguments) Convert() kafkaexporter.Metadata

Convert converts args into the upstream type.

func (*MetadataArguments) SetToDefault

func (args *MetadataArguments) SetToDefault()

type MetadataRetryArguments

type MetadataRetryArguments struct {
	MaxRetries int           `alloy:"max_retries,attr,optional"`
	Backoff    time.Duration `alloy:"backoff,attr,optional"`
}

MetadataRetryArguments configures how to retry retrieving metadata from the Kafka broker. Retrying is useful to avoid race conditions when the Kafka broker is starting at the same time as the otelcol.receiver.kafka component.

func (MetadataRetryArguments) Convert

Convert converts args into the upstream type.

type PlaintextArguments

type PlaintextArguments struct {
	Username string            `alloy:"username,attr"`
	Password alloytypes.Secret `alloy:"password,attr"`
}

PlaintextArguments configures plaintext authentication against the Kafka broker.

func (PlaintextArguments) Convert

func (args PlaintextArguments) Convert() map[string]interface{}

Convert converts args into the upstream type.

type SASLArguments

type SASLArguments struct {
	Username  string            `alloy:"username,attr"`
	Password  alloytypes.Secret `alloy:"password,attr"`
	Mechanism string            `alloy:"mechanism,attr"`
	Version   int               `alloy:"version,attr,optional"`
	AWSMSK    AWSMSKArguments   `alloy:"aws_msk,block,optional"`
}

SASLArguments configures SASL authentication against the Kafka broker.

func (SASLArguments) Convert

func (args SASLArguments) Convert() map[string]interface{}

Convert converts args into the upstream type.

Jump to

Keyboard shortcuts

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