kafka

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KafkaMessageGeneratedDiagnosisPrefix is the name prefix for diagnoses generated by kafka message.
	KafkaMessageGeneratedDiagnosisPrefix = "kafka-message"
	// KafkaMessageTopicAnnotation is the annotation used to store the kafka message topic.
	KafkaMessageTopicAnnotation = util.KubeDiagPrefix + "kafka-message-topic"
	// KafkaMessagePartitionAnnotation is the annotation used to store the kafka message partition.
	KafkaMessagePartitionAnnotation = util.KubeDiagPrefix + "kafka-message-partition"
	// KafkaMessageOffsetAnnotation is the annotation used to store the kafka message offset.
	KafkaMessageOffsetAnnotation = util.KubeDiagPrefix + "kafka-message-offset"
	// KafkaMessageKeyAnnotation is the annotation used to store the kafka message key.
	KafkaMessageKeyAnnotation = util.KubeDiagPrefix + "kafka-message-key"
	// KafkaMessageValueAnnotation is the annotation used to store the kafka message value.
	KafkaMessageValueAnnotation = util.KubeDiagPrefix + "kafka-message-value"
	// KafkaMessageHeadersAnnotation is the annotation used to store the kafka message headers.
	KafkaMessageHeadersAnnotation = util.KubeDiagPrefix + "kafka-message-headers"
	// KafkaMessageTimeAnnotation is the annotation used to store the kafka message time.
	KafkaMessageTimeAnnotation = util.KubeDiagPrefix + "kafka-message-time"
	// KafkaMessageOperationSetKey is the key to specify operationset in kafka messages.
	KafkaMessageOperationSetKey = "operationset"
	// KafkaMessageNodeNameKey is the key to specify node in kafka messages.
	KafkaMessageNodeNameKey = "node"
	// KafkaMessagePodNameKey is the key to specify pod name in kafka messages.
	KafkaMessagePodNameKey = "pod"
	// KafkaMessagePodNamespaceKey is the key to specify pod namespace in kafka messages.
	KafkaMessagePodNamespaceKey = "namespace"
	// KafkaMessageContainerKey is the key to specify container in kafka messages.
	KafkaMessageContainerKey = "container"
)

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	// Run runs the Consumer.
	Run(<-chan struct{})
}

Consumer consumes kafka messages and create diagnoses from messages.

func NewConsumer

func NewConsumer(
	ctx context.Context,
	logger logr.Logger,
	cli client.Client,
	brokers []string,
	topic string,
	kafkaConsumerEnabled bool,
) (Consumer, error)

NewConsumer creates a new Consumer.

Jump to

Keyboard shortcuts

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