settings

package
v0.0.0-...-b01a1fc Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package settings - holds configuration specific to a Retrieval Provider node.

Index

Constants

View Source
const DefaultLongTCPInactivityTimeout = 5000 * time.Millisecond

DefaultLongTCPInactivityTimeout is the default timeout for long TCP inactivity. This timeout should never be ignored.

View Source
const DefaultRegisterRefreshDuration = 5000 * time.Millisecond

DefaultRegisterRefreshDuration is the default register refresh duration

View Source
const DefaultTCPInactivityTimeout = 100 * time.Millisecond

DefaultTCPInactivityTimeout is the default timeout for TCP inactivity

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSettings

type AppSettings struct {
	BindRestAPI    string `mapstructure:"BIND_REST_API"`    // Port number to bind to for client REST API.
	BindGatewayAPI string `mapstructure:"BIND_GATEWAY_API"` // Port number to bind to for gateway TCP communication API.
	BindAdminAPI   string `mapstructure:"BIND_ADMIN_API"`   // Port number to bind to for admin TCP communication API.

	LogLevel      string `mapstructure:"LOG_LEVEL"`       // Log Level: NONE, ERROR, WARN, INFO, TRACE
	LogTarget     string `mapstructure:"LOG_TARGET"`      // Log Level: STDOUT
	LogDir        string `mapstructure:"LOG_DIR"`         // Log Dir: /var/log/fc-retrieval/fc-retrieval-provider
	LogFile       string `mapstructure:"LOG_FILE"`        // Log File: provider.log
	LogMaxBackups int    `mapstructure:"LOG_MAX_BACKUPS"` // Log max backups: 3
	LogMaxAge     int    `mapstructure:"LOG_MAX_AGE"`     // Log max age (days): 28
	LogMaxSize    int    `mapstructure:"LOG_MAX_SIZE"`    // Log max size (MB): 500
	LogCompress   bool   `mapstructure:"LOG_COMPRESS"`    // Log compress: false

	ProviderID     string `mapstructure:"PROVIDER_ID"`      // Node id of this provider
	ProviderSigAlg uint8  `mapstructure:"PROVIDER_SIG_ALG"` // Signature algorithm to be used by private key.

	RegisterAPIURL          string        `mapstructure:"REGISTER_API_URL"`          // Register service url
	RegisterRefreshDuration time.Duration `mapstructure:"REGISTER_REFRESH_DURATION"` // Register refresh duration
	ProviderAddress         string        `mapstructure:"PROVIDER_ADDRESS"`          // Provider address
	ProviderRootSigningKey  string        `mapstructure:"PROVIDER_ROOT_SIGNING_KEY"` // Provider root signing key
	ProviderSigningKey      string        `mapstructure:"PROVIDER_SIGNING_KEY"`      // Provider signing key
	ProviderRegionCode      string        `mapstructure:"PROVIDER_REGION_CODE"`      // Provider region code
	NetworkInfoClient       string        `mapstructure:"NETWORK_CLIENT_INFO"`       // Provider client network info
	NetworkInfoGateway      string        `mapstructure:"NETWORK_GATEWAY_INFO"`      // Provider provider network info
	NetworkInfoAdmin        string        `mapstructure:"NETWORK_ADMIN_INFO"`        // Provider admin network info

	TCPInactivityTimeout     time.Duration `mapstructure:"TCP_INACTIVITY_TIMEOUT"`      // TCP inactivity timeout
	TCPLongInactivityTimeout time.Duration `mapstructure:"TCP_LONG_INACTIVITY_TIMEOUT"` // TCP long inactivity timeout

	SearchPrice *big.Int `mapstructure:"SEARCH_PRICE"`
	OfferPrice  *big.Int `mapstructure:"OFFER_PRICE"`
	TopupAmount *big.Int `mapstructure:"TOPUP_AMOUNT"`
}

AppSettings defines the server configuraiton

Jump to

Keyboard shortcuts

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