confile

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProfile = "conf.yaml"
View Source
const TempleteProfile = `` /* 647-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Confile

type Confile struct {
	Rpc         []string `name:"Rpc" toml:"Rpc" yaml:"Rpc"`
	Boot        []string `name:"Boot" toml:"Boot" yaml:"Boot"`
	Mnemonic    string   `name:"Mnemonic" toml:"Mnemonic" yaml:"Mnemonic"`
	StakingAcc  string   `name:"StakingAcc" toml:"StakingAcc" yaml:"StakingAcc"`
	EarningsAcc string   `name:"EarningsAcc" toml:"EarningsAcc" yaml:"EarningsAcc"`
	Workspace   string   `name:"Workspace" toml:"Workspace" yaml:"Workspace"`
	Port        int      `name:"Port" toml:"Port" yaml:"Port"`
	UseSpace    uint64   `name:"UseSpace" toml:"UseSpace" yaml:"UseSpace"`
	UseCpu      uint8    `name:"UseCpu" toml:"UseCpu" yaml:"UseCpu"`
	TeeList     []string `name:"TeeList" toml:"TeeList" yaml:"TeeList"`
}

func NewConfigFile

func NewConfigFile() *Confile

func (*Confile) Parse

func (c *Confile) Parse(fpath string) error

func (*Confile) ReadBootnodes

func (c *Confile) ReadBootnodes() []string

func (*Confile) ReadEarningsAcc

func (c *Confile) ReadEarningsAcc() string

func (*Confile) ReadMnemonic

func (c *Confile) ReadMnemonic() string

func (*Confile) ReadPriorityTeeList

func (c *Confile) ReadPriorityTeeList() []string

func (*Confile) ReadRpcEndpoints

func (c *Confile) ReadRpcEndpoints() []string

func (*Confile) ReadServicePort

func (c *Confile) ReadServicePort() int

func (*Confile) ReadSignatureAccount

func (c *Confile) ReadSignatureAccount() string

func (*Confile) ReadSignaturePublickey

func (c *Confile) ReadSignaturePublickey() []byte

func (*Confile) ReadStakingAcc

func (c *Confile) ReadStakingAcc() string

func (*Confile) ReadUseCpu

func (c *Confile) ReadUseCpu() uint8

func (*Confile) ReadUseSpace

func (c *Confile) ReadUseSpace() uint64

func (*Confile) ReadWorkspace

func (c *Confile) ReadWorkspace() string

func (*Confile) SetBootNodes

func (c *Confile) SetBootNodes(boot []string)

func (*Confile) SetEarningsAcc

func (c *Confile) SetEarningsAcc(earningsAcc string) error

func (*Confile) SetMnemonic

func (c *Confile) SetMnemonic(mnemonic string) error

func (*Confile) SetPriorityTeeList

func (c *Confile) SetPriorityTeeList(tees []string)

func (*Confile) SetRpcAddr

func (c *Confile) SetRpcAddr(rpc []string)

func (*Confile) SetServicePort

func (c *Confile) SetServicePort(port int) error

func (*Confile) SetUseSpace

func (c *Confile) SetUseSpace(useSpace uint64)

func (*Confile) SetWorkspace

func (c *Confile) SetWorkspace(workspace string) error

type Confiler

type Confiler interface {
	Parse(fpath string) error
	ReadRpcEndpoints() []string
	ReadBootnodes() []string
	ReadServicePort() int
	ReadWorkspace() string
	ReadMnemonic() string
	ReadStakingAcc() string
	ReadEarningsAcc() string
	ReadUseSpace() uint64
	ReadSignaturePublickey() []byte
	ReadSignatureAccount() string
	ReadUseCpu() uint8
	ReadPriorityTeeList() []string
}

Jump to

Keyboard shortcuts

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