Documentation
¶
Index ¶
- Constants
- func GetLogOptions() *logconfig.LogOptions
- type DiscoveryType
- type LocationType
- type Openvpn
- type Options
- type OptionsDirectory
- type OptionsDiscovery
- type OptionsFirewall
- type OptionsHermes
- type OptionsKeystore
- type OptionsLocation
- type OptionsNetwork
- type OptionsPayments
- type OptionsQuality
- type OptionsTransactor
- type OptionsUI
- type QualityType
Constants ¶
const ( // DiscoveryTypeAPI defines type which discovers proposals through Mysterium API DiscoveryTypeAPI = DiscoveryType("api") // DiscoveryTypeBroker defines type which discovers proposals through Broker (Mysterium Communication) DiscoveryTypeBroker = DiscoveryType("broker") )
const ( // LocationTypeManual defines type which resolves location from manually entered values LocationTypeManual = LocationType("manual") // LocationTypeBuiltin defines type which resolves location from built in DB LocationTypeBuiltin = LocationType("builtin") // LocationTypeMMDB defines type which resolves location from given MMDB file LocationTypeMMDB = LocationType("mmdb") // LocationTypeOracle defines type which resolves location from given URL of LocationOracle LocationTypeOracle = LocationType("oracle") )
const ( // QualityTypeElastic defines type which uses ElasticSearch as Quality Oracle provider QualityTypeElastic = QualityType("elastic") // QualityTypeMORQA defines type which uses Mysterium MORQA as Quality Oracle provider QualityTypeMORQA = QualityType("morqa") // QualityTypeNone defines type which disables Quality Oracle QualityTypeNone = QualityType("none") )
Variables ¶
This section is empty.
Functions ¶
func GetLogOptions ¶
func GetLogOptions() *logconfig.LogOptions
GetLogOptions retrieves logger options from the app configuration.
Types ¶
type Openvpn ¶
Openvpn interface is abstraction over real openvpn options to unblock mobile development will disappear as soon as go-openvpn will unify common factory for openvpn creation
type Options ¶
type Options struct {
Directories OptionsDirectory
TequilapiAddress string
TequilapiPort int
TequilapiEnabled bool
BindAddress string
UI OptionsUI
FeedbackURL string
Keystore OptionsKeystore
logconfig.LogOptions
OptionsNetwork
Discovery OptionsDiscovery
Quality OptionsQuality
Location OptionsLocation
Transactor OptionsTransactor
Hermes OptionsHermes
Openvpn Openvpn
Firewall OptionsFirewall
Payments OptionsPayments
Consumer bool
P2PPorts *port.Range
}
Options describes options which are required to start Node
func GetOptions ¶
func GetOptions() *Options
GetOptions retrieves node options from the app configuration.
type OptionsDirectory ¶
type OptionsDirectory struct {
// Data directory stores persistent data like keystore, cli history, etc.
Data string
// Data directory stores database
Storage string
// Data directory stores identity keys
Keystore string
// Script directory stores all data needed for runtime, e.g. DNS scripts.
Script string
// Runtime directory for various temp file - usually current working dir
Runtime string
}
OptionsDirectory describes data structure holding directories as parameters.
func GetOptionsDirectory ¶
func GetOptionsDirectory(network *OptionsNetwork) *OptionsDirectory
GetOptionsDirectory retrieves directory configuration from app configuration.
func (*OptionsDirectory) Check ¶
func (options *OptionsDirectory) Check() error
Check checks that configured dirs exist (which should contain info) and runtime dirs are created (if not exist)
type OptionsDiscovery ¶
type OptionsDiscovery struct {
Types []DiscoveryType
Address string
PingInterval time.Duration
FetchEnabled bool
FetchInterval time.Duration
}
OptionsDiscovery describes possible parameters of discovery configuration
func GetDiscoveryOptions ¶
func GetDiscoveryOptions() *OptionsDiscovery
GetDiscoveryOptions retrieves discovery options from the app configuration.
type OptionsFirewall ¶
type OptionsFirewall struct {
BlockAlways bool
}
OptionsFirewall represent firewall control options
type OptionsHermes ¶
type OptionsHermes struct {
HermesID string
}
OptionsHermes describes possible parameters for interaction with Hermes
type OptionsKeystore ¶
type OptionsKeystore struct {
UseLightweight bool
}
OptionsKeystore stores the keystore configuration
type OptionsLocation ¶
type OptionsLocation struct {
IPDetectorURL string
Type LocationType
Address string
Country string
City string
NodeType string
}
OptionsLocation describes possible parameters of location detection configuration
type OptionsNetwork ¶
type OptionsNetwork struct {
Testnet bool
Localnet bool
Betanet bool
ExperimentNATPunching bool
MysteriumAPIAddress string
BrokerAddress string
EtherClientRPC string
}
OptionsNetwork describes possible parameters of network configuration
type OptionsPayments ¶
type OptionsPayments struct {
MaxAllowedPaymentPercentile int
BCTimeout time.Duration
HermesPromiseSettlingThreshold float64
SettlementTimeout time.Duration
MystSCAddress string
WethAddress string
DaiAddress string
ConsumerUpperGBPriceBound *big.Int
ConsumerLowerGBPriceBound *big.Int
ConsumerUpperMinutePriceBound *big.Int
ConsumerLowerMinutePriceBound *big.Int
ConsumerDataLeewayMegabytes uint64
ProviderInvoiceFrequency time.Duration
MaxUnpaidInvoiceValue *big.Int
}
OptionsPayments controls the behaviour of payments
type OptionsQuality ¶
type OptionsQuality struct {
Type QualityType
Address string
}
OptionsQuality describes possible parameters of Quality Oracle configuration
type OptionsTransactor ¶
type OptionsTransactor struct {
TransactorEndpointAddress string
RegistryAddress string
ChannelImplementation string
ProviderMaxRegistrationAttempts int
ProviderRegistrationRetryDelay time.Duration
ProviderRegistrationStake *big.Int
}
OptionsTransactor describes possible parameters for interaction with transactor