conf

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRpc = "swan"
)

Variables

This section is empty.

Functions

func GenerateRepo added in v0.4.6

func GenerateRepo(cpRepoPath string) error

func GetRpcByName

func GetRpcByName(rpcName string) (string, error)

func InitConfig

func InitConfig(cpRepoPath string, standalone bool) error

func UpdateConfigFile added in v0.4.6

func UpdateConfigFile(cpRepoPath string, multiAddress, nodeName string, port int) error

Types

type API

type API struct {
	Port            int
	MultiAddress    string
	Domain          string
	NodeName        string
	RedisUrl        string
	RedisPassword   string
	WalletWhiteList string
}

type CONTRACT

type CONTRACT struct {
	SwanToken  string `toml:"SWAN_CONTRACT"`
	Collateral string `toml:"SWAN_COLLATERAL_CONTRACT"`
}

type ComputeNode

type ComputeNode struct {
	API      API
	UBI      UBI
	LOG      LOG
	HUB      HUB
	MCS      MCS
	Registry Registry
	RPC      RPC
	CONTRACT CONTRACT
}

ComputeNode is a compute node config

func GetConfig

func GetConfig() *ComputeNode

type HUB

type HUB struct {
	WalletAddress    string
	ServerUrl        string
	AccessToken      string
	BalanceThreshold float64
	OrchestratorPk   string
	VerifySign       bool
}

type LOG

type LOG struct {
	CrtFile string
	KeyFile string
}

type MCS

type MCS struct {
	ApiKey        string
	AccessToken   string
	BucketName    string
	Network       string
	FileCachePath string
}

type RPC

type RPC struct {
	SwanTestnet string `toml:"SWAN_TESTNET"`
	SwanMainnet string `toml:"SWAN_MAINNET"`
}

type Registry

type Registry struct {
	ServerAddress string
	UserName      string
	Password      string
}

type UBI

type UBI struct {
	UbiTask     bool
	UbiEnginePk string
	UbiUrl      string
}

Jump to

Keyboard shortcuts

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