confile

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.8.1

type App struct {
	Workspace   string `name:"workspace" toml:"workspace" yaml:"workspace"`
	Port        uint16 `name:"port" toml:"port" yaml:"port"`
	Maxusespace uint64 `name:"maxusespace" toml:"maxusespace" yaml:"maxusespace"`
	Cores       uint32 `name:"cores" toml:"cores" yaml:"cores"`
	ApiEndpoint string `name:"apiendpoint" toml:"apiendpoint" yaml:"apiendpoint"`
}

type Chain added in v0.8.1

type Chain struct {
	Mnemonic    string   `name:"mnemonic" toml:"mnemonic" yaml:"mnemonic"`
	Stakingacc  string   `name:"stakingacc" toml:"stakingacc" yaml:"stakingacc"`
	Earningsacc string   `name:"earningsacc" toml:"earningsacc" yaml:"earningsacc"`
	Timeout     uint16   `name:"timeout" toml:"timeout" yaml:"timeout"`
	Rpcs        []string `name:"rpcs" toml:"rpcs" yaml:"rpcs"`
	Tees        []string `name:"tees" toml:"tees" yaml:"tees"`
}

type Confile

type Confile struct {
	App   `yaml:"app"`
	Chain `yaml:"chain"`
}

func NewConfigFile

func NewConfigFile() *Confile

func (*Confile) Parse

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

func (*Confile) ReadApiEndpoint added in v0.8.1

func (c *Confile) ReadApiEndpoint() 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() uint16

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() uint32

func (*Confile) ReadUseSpace

func (c *Confile) ReadUseSpace() uint64

func (*Confile) ReadWorkspace

func (c *Confile) ReadWorkspace() string

func (*Confile) SetCpuCores added in v0.8.1

func (c *Confile) SetCpuCores(cores int)

func (*Confile) SetEarningsAcc

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

func (*Confile) SetEndpoint added in v0.8.1

func (c *Confile) SetEndpoint(endpoint string)

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 uint16) 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
	ReadServicePort() uint16
	ReadWorkspace() string
	ReadMnemonic() string
	ReadStakingAcc() string
	ReadEarningsAcc() string
	ReadUseSpace() uint64
	ReadSignaturePublickey() []byte
	ReadSignatureAccount() string
	ReadUseCpu() uint32
	ReadPriorityTeeList() []string
	ReadApiEndpoint() string
}

Jump to

Keyboard shortcuts

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