config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBackendConfiguredNotValid = fmt.Errorf(
	"backend configured not valid, opts are: %s, %s", types.BackendGoChannels, types.BackendKafka)

Functions

This section is empty.

Types

type Config

type Config struct {
	Backend   types.Backend `json:"backend" yaml:"backend"`
	Kafka     Kafka         `json:"kafka" yaml:"kafka" validate:"required_if=Backend kafka"`
	GoChannel GoChannel     `json:"goChannel" yaml:"goChannel" validate:"required_if=Backend goChannel"`
}

func Default

func Default() *Config

func (*Config) Key

func (c *Config) Key() string

func (*Config) Validate

func (c *Config) Validate() error

type GoChannel

type GoChannel struct {
	OutputChannelBuffer int64 `json:"outputChannelBuffer" yaml:"outputChannelBuffer" validate:"omitempty,required,min=1024"`
	Persistent          bool  `json:"persistent" yaml:"persistent"`
}

type Kafka

type Kafka struct {
	Brokers []string `json:"brokers" yaml:"brokers" validate:"omitempty,min=1,dive,required"`
}

Jump to

Keyboard shortcuts

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