conf

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRpc = "swan"
)

Variables

This section is empty.

Functions

func GetRpcByName

func GetRpcByName(rpcName string) (string, error)

func InitConfig

func InitConfig(cpRepoPath string) error

Types

type API

type API struct {
	Port          int
	MultiAddress  string
	Domain        string
	NodeName      string
	RedisUrl      string
	RedisPassword 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