configs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	RPC struct {
		Endpoints     []string `yaml:"endpoints" json:"endpoints"`
		DisableUpdate bool     `yaml:"disableUpdate" json:"disableUpdate"`
	} `yaml:"rpc" json:"rpc"`
	NodeId string `yaml:"nodeId" json:"nodeId"`
	Secret string `yaml:"secret" json:"secret"`
}

APIConfig 节点API配置

func LoadAPIConfig

func LoadAPIConfig() (*APIConfig, error)

func NewAPIConfig added in v0.5.8

func NewAPIConfig() *APIConfig

func (*APIConfig) WriteFile

func (this *APIConfig) WriteFile(path string) error

WriteFile 保存到文件

type ClusterConfig

type ClusterConfig struct {
	RPC struct {
		Endpoints     []string `yaml:"endpoints" json:"endpoints"`
		DisableUpdate bool     `yaml:"disableUpdate" json:"disableUpdate"`
	} `yaml:"rpc" json:"rpc"`
	ClusterId string `yaml:"clusterId" json:"clusterId"`
	Secret    string `yaml:"secret" json:"secret"`
}

ClusterConfig 集群配置

Jump to

Keyboard shortcuts

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