config

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAddress

type IAddress interface {
	GetTCP() string
	GetHTTP() string
	GetPPROF() string
}

type IConfig

type IConfig interface {
	GetSettings() IConfigSettings
	GetLogging() logger.ILogging
	GetAddress() IAddress
	GetConnections() []string
	GetConsumers() []string
}

func BuildConfig

func BuildConfig(pFilepath string, pCfg *SConfig) (IConfig, error)

func InitConfig

func InitConfig(cfgPath string, initCfg *SConfig) (IConfig, error)

func LoadConfig

func LoadConfig(pFilepath string) (IConfig, error)

type IConfigSettings

type IConfigSettings interface {
	message.ISettings
	net_message.ISettings

	GetQueuePeriodMS() uint64
	GetMessagesCapacity() uint64
	GetLimitVoidSizeBytes() uint64
	GetStorageEnabled() bool
}

type SAddress

type SAddress struct {
	FTCP   string `yaml:"tcp,omitempty"`
	FHTTP  string `yaml:"http,omitempty"`
	FPPROF string `yaml:"pprof,omitempty"`
}

func (*SAddress) GetHTTP

func (p *SAddress) GetHTTP() string

func (*SAddress) GetPPROF

func (p *SAddress) GetPPROF() string

func (*SAddress) GetTCP

func (p *SAddress) GetTCP() string

type SConfig

type SConfig struct {
	FSettings *SConfigSettings `yaml:"settings"`

	FLogging     []string  `yaml:"logging,omitempty"`
	FAddress     *SAddress `yaml:"address,omitempty"`
	FConnections []string  `yaml:"connections,omitempty"`
	FConsumers   []string  `yaml:"consumers,omitempty"`
	// contains filtered or unexported fields
}

func (*SConfig) GetAddress

func (p *SConfig) GetAddress() IAddress

func (*SConfig) GetConnections

func (p *SConfig) GetConnections() []string

func (*SConfig) GetConsumers

func (p *SConfig) GetConsumers() []string

func (*SConfig) GetLogging

func (p *SConfig) GetLogging() logger.ILogging

func (*SConfig) GetSettings

func (p *SConfig) GetSettings() IConfigSettings

type SConfigSettings

type SConfigSettings struct {
	FMessageSizeBytes   uint64 `json:"message_size_bytes" yaml:"message_size_bytes"`
	FKeySizeBits        uint64 `json:"key_size_bits" yaml:"key_size_bits"`
	FMessagesCapacity   uint64 `json:"messages_capacity" yaml:"messages_capacity"`
	FWorkSizeBits       uint64 `json:"work_size_bits,omitempty" yaml:"work_size_bits,omitempty"`
	FQueuePeriodMS      uint64 `json:"queue_period_ms,omitempty" yaml:"queue_period_ms,omitempty"`
	FLimitVoidSizeBytes uint64 `json:"limit_void_size_bytes,omitempty" yaml:"limit_void_size_bytes,omitempty"`
	FNetworkKey         string `json:"network_key,omitempty" yaml:"network_key,omitempty"`
	FStorageEnabled     bool   `json:"storage_enabled,omitempty" yaml:"storage_enabled,omitempty"`
}

func (*SConfigSettings) GetKeySizeBits

func (p *SConfigSettings) GetKeySizeBits() uint64

func (*SConfigSettings) GetLimitVoidSizeBytes

func (p *SConfigSettings) GetLimitVoidSizeBytes() uint64

func (*SConfigSettings) GetMessageSizeBytes

func (p *SConfigSettings) GetMessageSizeBytes() uint64

func (*SConfigSettings) GetMessagesCapacity

func (p *SConfigSettings) GetMessagesCapacity() uint64

func (*SConfigSettings) GetNetworkKey

func (p *SConfigSettings) GetNetworkKey() string

func (*SConfigSettings) GetQueuePeriodMS

func (p *SConfigSettings) GetQueuePeriodMS() uint64

func (*SConfigSettings) GetStorageEnabled added in v1.6.2

func (p *SConfigSettings) GetStorageEnabled() bool

func (*SConfigSettings) GetWorkSizeBits

func (p *SConfigSettings) GetWorkSizeBits() uint64

Jump to

Keyboard shortcuts

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