config

package
v0.0.0-...-11e3e77 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config defines the system config. Include environment variables and yaml file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configer

type Configer interface {
	GetMongDBURI() string
	GetMongDBName() string
	GetRedisURI() string
	GetRateLimte() float64 // RateLimte限制定义了某些事件的最大频率。 限制表示为每秒的事件数。 零限制不允许发生任何事件。
	GetBurst() int
}

Configer define some functions to obtain system built-in parameters.

func InitConfiger

func InitConfiger() (Configer, error)

InitConfiger initialize system parameter configuration.

type Env

type Env struct {
	// contains filtered or unexported fields
}

func (*Env) GetBurst

func (e *Env) GetBurst() int

func (*Env) GetMongDBName

func (e *Env) GetMongDBName() string

func (*Env) GetMongDBURI

func (e *Env) GetMongDBURI() string

func (*Env) GetRateLimte

func (e *Env) GetRateLimte() float64

func (*Env) GetRedisURI

func (e *Env) GetRedisURI() string

type Yaml

type Yaml struct{}

YamlImpl yaml

func (*Yaml) GetBurst

func (y *Yaml) GetBurst() int

func (*Yaml) GetMongDBName

func (y *Yaml) GetMongDBName() string

func (*Yaml) GetMongDBURI

func (y *Yaml) GetMongDBURI() string

func (*Yaml) GetRateLimte

func (y *Yaml) GetRateLimte() float64

func (*Yaml) GetRedisURI

func (y *Yaml) GetRedisURI() string

Jump to

Keyboard shortcuts

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