Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RunningDev mode RunningDev RunMode = "dev" // RunningQA mode RunningQA RunMode = "qa" // RunningTest mode RunningTest RunMode = "test" // RunningMain mode RunningMain RunMode = "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 ¶
GetSubstrate gets a client to subsrate blockchain
Types ¶
type Config ¶
type Config struct { Yggdrasil struct { Peers []string `json:"peers"` } `json:"yggdrasil"` Mycelium struct { Peers []string `json:"peers"` } `json:"mycelium"` Users struct { Authorized []string `json:"authorized"` } `json:"users"` RolloutUpgrade struct { TestFarms []uint32 `json:"test_farms"` } `json:"rollout_upgrade"` }
Config is configuration set by the organization
func GetConfigForMode ¶
GetConfig returns extend config for specific run mode
type Environment ¶
type Environment struct { RunningMode RunMode FlistURL string BinRepo string FarmID pkg.FarmID Orphan bool FarmSecret string SubstrateURL []string // IMPORTANT NOTICE: // SINCE RELAYS FOR A NODE IS STORED ON THE CHAIN IN A LIMITED SPACE // PLEASE MAKE SURE THAT ANY ENV HAS NO MORE THAN FOUR RELAYS CONFIGURED RelayURL []string ActivationURL []string GraphQL []string KycURL string // private vlan to join // if set, zos will use this as its priv vlan PrivVlan *uint16 // pub vlan to join // if set, zos will use this as it's pub vlan // only in a single nic setup PubVlan *uint16 // PubMac value from environment PubMac PubMac }
Environment holds information about running environment of a node it defines the different constant based on the running mode (dev, test, prod)
func MustGet ¶
func MustGet() Environment
MustGet returns the running environment of the node panics on error
type PubMac ¶
type PubMac string
PubMac specify how the mac address of the public nic (in case of public-config) is calculated
const ( // PubMacRandom means the mac of the public nic will be chosen by the system // the value won't change across reboots, but is based on the node id // (default) PubMacRandom PubMac = "random" // PubMacSwap means the value of the mac is swapped with the physical nic // where the public traffic is eventually going through PubMacSwap PubMac = "swap" )
Click to show internal directories.
Click to hide internal directories.