config

package
v0.0.0-...-4cc9216 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalEtcdConfig   EtcdConfig
	GlobalServerConfig Config
)
View Source
var (
	MessageClient messageservice.Client
	LiveClient    liveservice.Client
	Receiver      sync.Map
	Limiter       = tools.NewLimiter(time.Second, 20)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Name       string       `json:"name"`
	Server     ServerConfig `json:"server"`
	NsqInfo    NsqConfig    `json:"nsq"`
	MessageSrv RPCSrvConfig `json:"message_srv"`
	LiveSrv    RPCSrvConfig `json:"live_srv"`
}

type EtcdConfig

type EtcdConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port string `mapstructure:"port" json:"port"`
	Key  string `mapstructure:"key" json:"key"`
}

type NsqConfig

type NsqConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	Topic    string `json:"topic"`
}

type RPCSrvConfig

type RPCSrvConfig struct {
	Name string `json:"name"`
}

type ServerConfig

type ServerConfig struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

Jump to

Keyboard shortcuts

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