Documentation
¶
Index ¶
Constants ¶
View Source
const ( //RunningDev RunningMode = "dev" RunningDev RunningMode = "dev" //RunningTest RunningMode = "test" RunningTest RunningMode = "test" RunningMain RunningMode = "prod" // Orphanage is the default farmid where nodes are registered // if no farmid were specified on the kernel command line OrphanageDev pkg.FarmID = 0 OrphanageTest pkg.FarmID = 0 OrphanageMain pkg.FarmID = 0 )
Possible running mode of a node
Variables ¶
This section is empty.
Functions ¶
func GetSubstrate ¶ added in v0.5.5
GetSubstrate gets a client to subsrate blockchain
Types ¶
type Config ¶ added in v0.5.5
type Config struct {
// Monitor is a list of twins that need to updated continuesly
// with node free capacity and status.
Monitor []uint32 `json:"monitor"`
Yggdrasil struct {
Peers []string `json:"peers"`
} `json:"yggdrasil"`
}
Config is configuration set by the organization
type Environment ¶
type Environment struct {
RunningMode RunningMode
FlistURL string
BinRepo string
FarmerID pkg.FarmID
Orphan bool
FarmSecret string
SubstrateURL []string
ActivationURL string
ExtendedConfigURL string
}
Environment holds information about running environment of a node it defines the different constant based on the running mode (dev, test, prod)
func MustGet ¶ added in v0.5.5
func MustGet() Environment
MustGet returns the running environment of the node panics on error
type RunningMode ¶
type RunningMode string
RunningMode type
func (RunningMode) String ¶
func (r RunningMode) String() string
Click to show internal directories.
Click to hide internal directories.