configuration

package
v0.0.0-...-50c8bdb Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Online is when the implementation is permitted
	// to make outbound connections.
	Online Mode = "ONLINE"

	// Offline is when the implementation is not permitted
	// to make outbound connections.
	Offline Mode = "OFFLINE"

	// Mainnet is the Bitcoin Mainnet.
	Mainnet string = "MAINNET"

	// Testnet is Bitcoin Testnet3.
	Testnet string = "TESTNET"

	RPCPort = 7777

	// DataDirectory is the default location for all
	// persistent data.
	DataDirectory = "/data"

	// ModeEnv is the environment variable read
	// to determine mode.
	ModeEnv = "MODE"

	// NetworkEnv is the environment variable
	// read to determine network.
	NetworkEnv = "NETWORK"

	// PortEnv is the environment variable
	// read to determine the port for the Rosetta
	// implementation.
	PortEnv = "PORT"

	DefaultRPCURL = "http://157.245.67.232:7777/rpc"
)

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration(*Configuration, error)

LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.

Types

type Configuration

type Configuration struct {
	Mode                   Mode
	Network                *types.NetworkIdentifier
	Currency               *types.Currency
	GenesisBlockIdentifier *types.BlockIdentifier
	Port                   int
	RPCPort                int
	RPCURL                 string
}

Configuration determines how

type Mode

type Mode string

Mode is the setting that determines if the implementation is "online" or "offline".

Jump to

Keyboard shortcuts

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