config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TradeListeningPortKey is the port where the gRPC Trader interface will listen on
	TradeListeningPortKey = "TRADE_LISTENING_PORT"
	// OperatorListeningPortKey is the port where the gRPC Operator interface will listen on
	OperatorListeningPortKey = "OPERATOR_LISTENING_PORT"
	// DatadirKey is the local data directory to store the internal state of daemon
	DatadirKey = "DATADIR"
	// LogLevelKey are the different logging levels. For reference on the values https://godoc.org/github.com/sirupsen/logrus#Level
	LogLevelKey = "LOG_LEVEL"
	// FeeAccountBalanceThresholdKey is the treshold of LBTC balance (in satoshis) for the fee account, after which we alert the operator that it cannot subsidize anymore swaps
	FeeAccountBalanceThresholdKey = "FEE_ACCOUNT_BALANCE_THRESHOLD"
	// TradeExpiryTimeKey is the duration in seconds of lock on unspents we reserve for accepted trades, before eventually double spending it
	TradeExpiryTimeKey = "TRADE_EXPIRY_TIME"
	// TxSatsPerByteKey is the sats per byte ratio used to pay for txs' newtwork fees
	TxSatsPerByteKey = "TX_SATS_PER_BYTE"
	// PriceSlippageKey is the percentage of the slipage for accepting trades compared to current spot price
	PriceSlippageKey = "PRICE_SLIPPAGE"
	// TradeTLSKeyKey is the path of the the TLS key for the Trade interface
	TradeTLSKeyKey = "TRADE_TLS_KEY"
	// TradeTLSCertKey is the path of the the TLS certificate for the Trade interface
	TradeTLSCertKey = "TRADE_TLS_CERT"
	// EnableProfilerKey enables profiler that can be used to investigate performance issues
	EnableProfilerKey = "ENABLE_PROFILER"
	// StatsIntervalKey defines interval for printing basic tdex statistics
	StatsIntervalKey = "STATS_INTERVAL"
	// NoMacaroonsKey is used to start the daemon without using macaroons auth
	// service.
	NoMacaroonsKey = "NO_MACAROONS"
	// NoOperatorTlsKey is used to start the daemon without using TLS for the operator service
	NoOperatorTlsKey = "NO_OPERATOR_TLS"
	// OperatorExtraIP is used to add an extra ip address to the self-signed TLS
	// certificate for the Operator gRPC interface.
	OperatorExtraIPKey = "OPERATOR_EXTRA_IP"
	// OperatorExtraDomain is used to add an extra domain to the self signed TLS
	// certificate for the Operator gRPC interface. This is useful to add the
	// onion endpoint in case the daemon is served as a TOR hidden service for
	// example.
	OperatorExtraDomainKey = "OPERATOR_EXTRA_DOMAIN"
	// WalletUnlockPasswordFile defines full path to a file  that contains the
	//password for unlocking the wallet, if provided wallet will be unlocked
	//automatically
	WalletUnlockPasswordFile = "WALLET_UNLOCK_PASSWORD_FILE"
	// ConnectAddrKey is the address <host:port> of the tdex-daemon service to connect to, ie. myservice:9000
	ConnectAddrKey = "CONNECT_ADDR"
	// ConnectUrlProtoKey is the http/https protocol of the tdex-daemon service to connect to
	// used by tdexconnect to create connection url
	ConnectProtoKey = "CONNECT_PROTO"
	// OceanWalletAddrKey is the address for connecting to the ocean wallet.
	OceanWalletAddrKey = "WALLET_ADDR"
	// DBTypeKey is used to switch database type between those supported
	DBTypeKey = "DB_TYPE"

	DbLocation        = "db"
	TLSLocation       = "tls"
	MacaroonsLocation = "macaroons"
	ProfilerLocation  = "stats"
)

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string) bool

func GetDatadir

func GetDatadir() string

func GetDuration

func GetDuration(key string) time.Duration

func GetFloat

func GetFloat(key string) float64

func GetInt

func GetInt(key string) int

func GetString

func GetString(key string) string

func GetStringSlice

func GetStringSlice(key string) []string

func InitConfig

func InitConfig() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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