conf

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = Config{}

Conf 全局配置结构体

Functions

func LoadConfig

func LoadConfig(path string)

LoadConfig 加载本地配置

Types

type Config

type Config struct {
	RpcLog   bool                         `json:"rpc_log"`
	Module   map[string][]*ModuleSettings `json:"module"`
	Nats     Nats                         `json:"nats"`
	Settings map[string]any               `json:"settings"`
	Log      map[string]any               `json:"log"` // 不用定制
	BI       map[string]any               `json:"bi"`  // 不用定制
}

Config 配置结构体

type ModuleSettings

type ModuleSettings struct {
	ID         string         `json:"id"`   // 节点id(指@符号后面的值)
	Host       string         `json:"host"` // 没啥用
	ProcessEnv string         `json:"env"`
	Settings   map[string]any `json:"settings"`
}

ModuleSettings 模块配置

type Nats

type Nats struct {
	Addr          string `json:"addr"`
	MaxReconnects int    `json:"max_reconnects"`
}

Nats nats配置

Jump to

Keyboard shortcuts

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