conf

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists added in v0.6.0

func Exists(cpPath string) bool

func GenerateAndUpdateConfigFile added in v0.6.0

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

func GetRpcByNetWorkName added in v0.6.0

func GetRpcByNetWorkName() (string, error)

func InitConfig

func InitConfig(cpRepoPath string, standalone bool) error

Types

type API

type API struct {
	Port            int
	MultiAddress    string
	Domain          string
	NodeName        string
	WalletWhiteList string
	WalletBlackList string
	Pricing         bool
}

type CONTRACT

type CONTRACT struct {
	SwanToken         string `toml:"SWAN_CONTRACT"`
	CpAccountRegister string `toml:"REGISTER_CP_CONTRACT"`

	JobCollateral     string `toml:"SWAN_COLLATERAL_CONTRACT"`
	JobManager        string `toml:"SWAN_JOB_CONTRACT"`
	JobManagerCreated uint64 `toml:"JobManagerCreated"`

	TaskRegister string `toml:"REGISTER_TASK_CONTRACT"`
	ZkCollateral string `toml:"ZK_COLLATERAL_CONTRACT"`
	Sequencer    string `toml:"SEQUENCER_CONTRACT"`
}

type ComputeNode

type ComputeNode struct {
	API      API
	UBI      UBI
	LOG      LOG
	HUB      HUB
	MCS      MCS
	Registry Registry
	RPC      RPC
	CONTRACT CONTRACT `toml:"CONTRACT,omitempty"`
}

ComputeNode is a compute node config

func GetConfig

func GetConfig() *ComputeNode

type HUB

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

type LOG

type LOG struct {
	CrtFile string
	KeyFile string
}

type MCS

type MCS struct {
	ApiKey     string
	BucketName string
	Network    string
}

type RPC

type RPC struct {
	SwanChainRpc string `toml:"SWAN_CHAIN_RPC"`
}

type Registry

type Registry struct {
	ServerAddress string
	UserName      string
	Password      string
}

type UBI

type UBI struct {
	UbiEnginePk     string
	EnableSequencer bool
	AutoChainProof  bool
	SequencerUrl    string
}

Jump to

Keyboard shortcuts

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