envflags

package
v0.0.0-...-c18252c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WithSasl enables everything deemed necessary to work with SASL
	WithSasl = &withSaslOption{}
)

Functions

This section is empty.

Types

type KafkaFlags

type KafkaFlags struct {
	Logger *logging.Logger
	// contains filtered or unexported fields
}

KafkaFlags contains a set of flags for configuring Kafka.

func ForKafka

func ForKafka(configMap kafka.ConfigMap, opts ...KafkaOption) *KafkaFlags

ForKafka creates a helper object, which allows to create flags connected to Kafka configuration. Uses passed in Kafka configuration as a baseline.

func (*KafkaFlags) String

func (kf *KafkaFlags) String(key, usage string)

String creates String flag

func (*KafkaFlags) StringWithDefault

func (kf *KafkaFlags) StringWithDefault(key, def, usage string)

StringWithDefault create String flag with default value

func (*KafkaFlags) ToConfigMap

func (kf *KafkaFlags) ToConfigMap() *kafka.ConfigMap

ToConfigMap uses values from created flags and builds a Kafka configuration.

type KafkaOption

type KafkaOption interface {
	Apply(*KafkaFlags)
}

KafkaOption represents applying a set of options to flags

Jump to

Keyboard shortcuts

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