node

package
v0.0.0-...-b23dfd1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
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")
)
View Source
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")
)
View Source
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 DiscoveryType

type DiscoveryType string

DiscoveryType identifies proposal discovery provider

type LocationType

type LocationType string

LocationType identifies location type

type Openvpn

type Openvpn interface {
	Check() error
	BinaryPath() string
}

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

type OptionsUI

type OptionsUI struct {
	UIEnabled     bool
	UIBindAddress string
	UIPort        int
}

OptionsUI describes possible parameters of ui configuration

type QualityType

type QualityType string

QualityType identifies Quality Oracle provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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