config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPath = "./configs/config.yml"

DefaultPath 默认配置路径

Functions

This section is empty.

Types

type Config

type Config struct {
	InternalNet client.Config `yaml:"internalNet"`
	PortInner   string        `yaml:"portInner"`
	Port        string        `yaml:"port"`
	Model       string        `yaml:"model"`
	Log         logger.Config `yaml:"log"`
	Mysql       mysql2.Config `yaml:"mysql"`
	Mongo       mongo2.Config `yaml:"mongo"`
	Redis       redis2.Config `yaml:"redis"`
	Endpoint    Endpoint      `yaml:"endpoint"`
	Transport   Transport     `yaml:"transport"`
	Dapr        Dapr          `yaml:"dapr"`
}

Config 配置文件

var Conf *Config

Conf 配置文件

func NewConfig

func NewConfig(path string) (*Config, error)

NewConfig 获取配置配置

type Dapr

type Dapr struct {
	PubSubName string `yaml:"pubSubName"`
	TopicFlow  string `yaml:"topicFlow"`
}

type Endpoint

type Endpoint struct {
	Poly      string `yaml:"poly"`
	Form      string `yaml:"form"`
	FormInner string `yaml:"formInner"`
	PolyInner string `yaml:"polyInner"`
	Org       string `yaml:"org"`
	AppCenter string `yaml:"appCenter"`
	Search    string `yaml:"search"`
	Structor  string `yaml:"structor"`
}

type Transport

type Transport struct {
	Timeout               time.Duration `yaml:"timeout"`
	KeepAlive             time.Duration `yaml:"keepAlive"`
	MaxIdleConns          int           `yaml:"maxIdleConns"`
	IdleConnTimeout       time.Duration `yaml:"idleConnTimeout"`
	TLSHandshakeTimeout   time.Duration `yaml:"tlsHandshakeTimeout"`
	ExpectContinueTimeout time.Duration `yaml:"expectContinueTimeout"`
}

Jump to

Keyboard shortcuts

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