config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Brokers        []string `short:"b" long:"broker" description:"Kafka broker URL (you can use this option multiple times)" default:"localhost:9092"`
	Topics         []string `short:"t" long:"topic" description:"Kafka topic to read from (you can use this option multiple times)" required:"true"`
	ReadEarliest   bool     `short:"a" long:"read-earliest" description:"Read topic starting from the beginning (false by default)"`
	PrintHeaders   bool     `short:"r" long:"print-headers" description:"Print message headers (false by default)"`
	ProtoFile      string   `short:"p" long:"proto-file" description:"Path to proto file" required:"true"`
	ProtoMsg       string   `short:"m" long:"proto-message" description:"Proto message to use"`
	ProtoMsgHeader string   `short:"e" long:"proto-message-header" description:"Name of Kafka message header, that contains message's proto name"`

	// This flag is used only to detect if the app is running in `--help` mode or not
	IsHelp bool
}

func ParseOptions

func ParseOptions() (*Options, error)

Jump to

Keyboard shortcuts

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