config

package
v0.0.0-...-e4fe77d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseDir

func GetBaseDir() string

Types

type ClientConfig

type ClientConfig struct {
	RequestTimeout          int64 `yaml:"request-timeout"`
	RefreshEndpointInterval int64 `yaml:"refresh-endpoint-interval"`
}

func GetClientConfig

func GetClientConfig() *ClientConfig

type Config

type Config struct {
	Service    string          `yaml:"service"`
	AppListen  string          `yaml:"app-listen"`
	LocalIP    string          `yaml:"local-ip"`
	KeepAlive  int             `yaml:"keep-alive"`
	LogLevel   string          `yaml:"log-level"`
	LogDir     string          `yaml:"log-dir"`
	BaseDir    string          `yaml:"base-dir"`
	Registry   *Registry       `json:"registry"`
	ServerConf []*ServerConfig `yaml:"server"`
	ClientConf *ClientConfig   `yaml:"client"`
}

func GetConfig

func GetConfig() *Config

type Registry

type Registry struct {
	Name string            `json:"name"`
	Data map[string]string `json:"data"`
}

type ServerConfig

type ServerConfig struct {
	Name          string `yaml:"name"`
	Port          string `yaml:"port"`
	InvokeTimeout int64  `yaml:"invoke-timeout"`
	MaxInvoke     int64  `yaml:"max-invoke"`
}

func GetServerConfig

func GetServerConfig(name string) *ServerConfig

Jump to

Keyboard shortcuts

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