Documentation ¶
Index ¶
- Constants
- func InitializeAppConfig(baseDir string)
- func InitializeConfigs(baseDir string)
- func InitializeUserConfig(baseDir string)
- func LoadAppConfig()
- func LoadUserConfig()
- type AppConfiguration
- type BlockchainConfiguration
- type BlockchainUserConfiguration
- type DHTConfiguration
- type GlobalConfiguration
- type GlobalUserConfiguration
- type LogConfiguration
- type UpdateNetworkContractAddressArgs
- type UpdateNetworkContractAddressReply
- type UserConfigService
- type UserConfiguration
Constants ¶
View Source
const CONFIG_EXT = "yml"
View Source
const CONFIG_PATH = "/etc/marconid"
Variables ¶
This section is empty.
Functions ¶
func InitializeAppConfig ¶
func InitializeAppConfig(baseDir string)
initialize the appConfig object by parsing the appConfig file each time it's updated config_manager.go is kept outside of package "appConfig" on purpose so that we can avoid cyclic reference for packages that need to access the appConfig object, yet also expect to be notified when appConfig file changes
func InitializeConfigs ¶
func InitializeConfigs(baseDir string)
func InitializeUserConfig ¶
func InitializeUserConfig(baseDir string)
func LoadAppConfig ¶
func LoadAppConfig()
func LoadUserConfig ¶
func LoadUserConfig()
Types ¶
type AppConfiguration ¶
type AppConfiguration struct { Global GlobalConfiguration Blockchain BlockchainConfiguration DHT DHTConfiguration Log LogConfiguration }
func GetAppConfig ¶
func GetAppConfig() *AppConfiguration
type BlockchainConfiguration ¶
type BlockchainUserConfiguration ¶
type BlockchainUserConfiguration struct {
Network_Contract_Address string
}
type DHTConfiguration ¶
type DHTConfiguration struct { BootNodes string // a list of seed nodes used for the initial peer discovery in the DHT Max_Incoming_Packets_Per_Second int64 // max number of packets handled per second, increase this if bootnode is overwelmed (set to negative for unlimited) Max_Per_Client_Incoming_Packets_Per_Minute int // ignore a client's request packet if exceeds this limit, guard against spammy clients Announce_Base_Interval_Seconds int // announce the base route Announce_Self_Interval_Seconds int // announce itsef to the DHT every x seconds Request_Peers_Interval_Seconds int // send find peers request to the DHT every x seconds Cache_Routing_Table_To_Disk bool // determines whether DHT persist routing table to disk periodically and read it on startup }
type GlobalConfiguration ¶
type GlobalUserConfiguration ¶
type GlobalUserConfiguration struct {
Base_Dir string // base directory for Marconid
}
type LogConfiguration ¶
type UpdateNetworkContractAddressArgs ¶
type UpdateNetworkContractAddressArgs struct {
NetworkContractAddress string
}
type UpdateNetworkContractAddressReply ¶
type UpdateNetworkContractAddressReply struct{}
type UserConfigService ¶
type UserConfigService struct{}
func (*UserConfigService) UpdateNetworkContractAddressRPC ¶
func (u *UserConfigService) UpdateNetworkContractAddressRPC(r *http.Request, args *UpdateNetworkContractAddressArgs, reply *UpdateNetworkContractAddressReply) error
type UserConfiguration ¶
type UserConfiguration struct { Global GlobalUserConfiguration Blockchain BlockchainUserConfiguration }
func GetUserConfig ¶
func GetUserConfig() *UserConfiguration
Click to show internal directories.
Click to hide internal directories.