config

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportChannelConfig

func ExportChannelConfig(config Config, prefix string) func() *iproto.ChannelConfig

ExportChannelConfig exports flags with given prefix for iproto channel configuration. It returns factory of iproto.ChannelConfig which will be filled with flags values.

func ExportChannelConfigWithHandler

func ExportChannelConfigWithHandler(config Config, prefix string, wrapper func(iproto.Handler) iproto.Handler) func(iproto.Handler) *iproto.ChannelConfig

func ExportPacketServerConfig

func ExportPacketServerConfig(config Config, prefix string) func() *iproto.PacketServerConfig

func ExportParallelHandler

func ExportParallelHandler(config Config, prefix string) func(iproto.Handler) iproto.Handler

func ExportPoolConfig

func ExportPoolConfig(config Config, prefix string) func() *iproto.PoolConfig

ExportPoolConfig exports flags with given prefix for iproto pool configuration. It returns factory of iproto.PoolConfig which will be filled with flags values.

func ExportPoolHandler

func ExportPoolHandler(config Config, prefix string, poolConfig func() *pool.Config) func(iproto.Handler) iproto.Handler

Types

type Config

type Config interface {
	Duration(string, time.Duration, string, ...func(time.Duration) error) *time.Duration
	Int(string, int, string, ...func(int) error) *int
	Uint32(string, uint32, string, ...func(uint32) error) *uint32
	Bool(string, bool, string, ...func(bool) error) *bool
	Float64(string, float64, string, ...func(float64) error) *float64
}

Config describes an object that is capable to create configuration variables which could be changed from outside somehow.

Jump to

Keyboard shortcuts

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