config

package
v0.4.37 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomHooks = []viper.DecoderConfigOption{
	addDecodeHook(PulsarCompressionTypeHookFunc()),
	addDecodeHook(PulsarCompressionLevelHookFunc()),
	addDecodeHook(QuantityDecodeHook()),
}

Functions

func LogValidationErrors

func LogValidationErrors(err error)

func PulsarCompressionLevelHookFunc

func PulsarCompressionLevelHookFunc() mapstructure.DecodeHookFuncType

func PulsarCompressionTypeHookFunc

func PulsarCompressionTypeHookFunc() mapstructure.DecodeHookFuncType

func QuantityDecodeHook

func QuantityDecodeHook() mapstructure.DecodeHookFuncType

Types

type RedisConfig

type RedisConfig struct {
	// Either a single address or a seed list of host:port addresses
	Addrs           []string `validate:"required"`
	DB              int      `validate:"gte=0,lte=16"`
	Password        string
	MaxRetries      int
	MinRetryBackoff time.Duration
	MaxRetryBackoff time.Duration
	DialTimeout     time.Duration
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	PoolSize        int `validate:"required"`
	MinIdleConns    int
	MaxConnAge      time.Duration
	PoolTimeout     time.Duration
	IdleTimeout     time.Duration
	MasterName      string
}

func (RedisConfig) AsUniversalOptions

func (rc RedisConfig) AsUniversalOptions() *redis.UniversalOptions

Jump to

Keyboard shortcuts

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