Documentation
¶
Index ¶
Constants ¶
View Source
const ( CONFIG_DIR_NAME = ".ttchain-compute-provider" CONFIG_DEFAULT_FILENAME = "config" SWARM_KEY = "/key/swarm/psk/1.0.0/\n/base16/\n55158d9b6b7e5a8e41aa8b34dd057ff1880e38348613d27ae194ad7c5b9670d7" )
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigDir ¶
func DefaultConfigDir() string
func DefaultConfigPath ¶
func DefaultConfigPath() string
Types ¶
type ChainRegInfo ¶
type Config ¶
type Config struct {
ApiPort int // API port number
Identity Identity // p2p id
Keys []PublicKey // public key list
Bootstraps []string // local nodes's bootstrap peer addresses
LinkApi string // centralized reporting address
ChainApi string // blockchain address
SeedOrPhrase string // blockchain account seed or mnemonic
Vm VmOption // theoretical environment config
ChainRegInfo ChainRegInfo // chain registration information
}
Config config参数
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigManager ¶
func NewConfigManager() *ConfigManager
func NewConfigManagerWithPath ¶
func NewConfigManagerWithPath(path string) *ConfigManager
func (*ConfigManager) AddBootstrap ¶
func (cm *ConfigManager) AddBootstrap(bootstrap string) error
func (*ConfigManager) ConfigVM ¶
func (cm *ConfigManager) ConfigVM(vmOption VmOption) error
ConfigVM config
func (*ConfigManager) GetConfig ¶
func (cm *ConfigManager) GetConfig() (*Config, error)
func (*ConfigManager) RemoveBootstrap ¶
func (cm *ConfigManager) RemoveBootstrap(bootstrap string) error
func (*ConfigManager) Save ¶
func (cm *ConfigManager) Save(config *Config) error
Click to show internal directories.
Click to hide internal directories.