conf

package
v0.0.0-...-8062269 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf config
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init init config.

Types

type Comet

type Comet struct {
	RoutineChan int
	RoutineSize int
}

Comet is comet config.

type Config

type Config struct {
	Discovery *Discovery
	Env       *Env
	Nsq       *Nsq
	Comet     *Comet
	Room      *Room
	Log       *log.Config
}

Config is job config.

func (*Config) DiscoveryConfig

func (c *Config) DiscoveryConfig() *naming.Config

DiscoveryConfig 创建发现服务配置

func (*Config) Set

func (c *Config) Set(content string) (err error)

Set config setter.

type Discovery

type Discovery struct {
	Nodes []string
}

Discovery is discovery config.

type Env

type Env struct {
	Region    string
	Zone      string
	DeployEnv string
	Host      string
}

Env is env config.

type Nsq

type Nsq struct {
	Topic   string
	Channel string
	Address []string
}

Nsq is kafka config.

type Room

type Room struct {
	Batch  int
	Signal xtime.Duration
	Idle   xtime.Duration
}

Room is room config.

Jump to

Keyboard shortcuts

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