config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Debug        bool        `desc:"Enable or disable debug logs"`
	AsyncAPIDoc  []byte      `split_words:"true" desc:"Path or URL to a valid AsyncAPI doc (v2.0.0 is only supported)"`
	WSServerPort int         `split_words:"true" default:"5000" desc:"Port for the Websocket server. Used for debugging events"`
	KafkaProxy   *KafkaProxy `split_words:"true"`
}

App holds the config for the whole application.

func NewApp

func NewApp(opts ...Opt) *App

NewApp creates a App config with defaults.

func (App) ProxyConfig

func (c App) ProxyConfig() (*kafka.ProxyConfig, error)

ProxyConfig creates a config struct for the Kafka Proxy.

type KafkaProxy

type KafkaProxy struct {
	Address           string            `desc:"Address for this proxy. Should be reachable by your clients. Most probably a domain."`
	BrokerFromServer  string            `` /* 129-byte string literal not displayed */
	MessageValidation MessageValidation `split_words:"true"`
	TLS               *kafka.TLSConfig
	ExtraFlags        pipeSeparatedValues `` /* 259-byte string literal not displayed */
}

KafkaProxy holds the config for later configuring a Kafka proxy.

func NewKafkaProxy

func NewKafkaProxy() *KafkaProxy

NewKafkaProxy creates a KafkaProxy with defaults.

func (*KafkaProxy) ProxyConfig

func (c *KafkaProxy) ProxyConfig(d []byte, debug bool) (*kafka.ProxyConfig, error)

ProxyConfig creates a config struct for the Kafka Proxy based on a given AsyncAPI doc (if provided).

type MessageValidation

type MessageValidation struct {
	Enabled             bool   `default:"true" desc:"Enable or disable validation of Kafka messages"`
	PublishToKafkaTopic string `split_words:"true"`
}

MessageValidation holds the config about message validation.

type Opt

type Opt func(*App)

Opt is a functional option used for configuring an App.

Jump to

Keyboard shortcuts

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