kafka

package
Version: v0.1.7-0...-3edfa7d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 12 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.KubeDiagnoserPrefix + "kafka-message-topic"
	// KafkaMessagePartitionAnnotation is the annotation used to store the kafka message partition.
	KafkaMessagePartitionAnnotation = util.KubeDiagnoserPrefix + "kafka-message-partition"
	// KafkaMessageOffsetAnnotation is the annotation used to store the kafka message offset.
	KafkaMessageOffsetAnnotation = util.KubeDiagnoserPrefix + "kafka-message-offset"
	// KafkaMessageKeyAnnotation is the annotation used to store the kafka message key.
	KafkaMessageKeyAnnotation = util.KubeDiagnoserPrefix + "kafka-message-key"
	// KafkaMessageValueAnnotation is the annotation used to store the kafka message value.
	KafkaMessageValueAnnotation = util.KubeDiagnoserPrefix + "kafka-message-value"
	// KafkaMessageHeadersAnnotation is the annotation used to store the kafka message headers.
	KafkaMessageHeadersAnnotation = util.KubeDiagnoserPrefix + "kafka-message-headers"
	// KafkaMessageTimeAnnotation is the annotation used to store the kafka message time.
	KafkaMessageTimeAnnotation = util.KubeDiagnoserPrefix + "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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL