settings

package
v0.0.0-...-7a4b066 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

View Source
const DefaultLongTCPInactivityTimeout = 300000 * time.Millisecond

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

View Source
const DefaultMsgKeyUpdateDuration = 12 * time.Hour

DefaultMsgKeyUpdateDuration is the default msg signing key update duration

View Source
const DefaultSyncDuration = 12 * time.Hour

DefaultSyncDuration is the default peer manager sync duration

View Source
const DefaultTCPInactivityTimeout = 5000 * 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 {
	// Logging related settings
	LogServiceName string `mapstructure:"LOG_SERVICE_NAME"` // Log service name
	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/.fc-retrieval/log
	LogFile        string `mapstructure:"LOG_FILE"`         // Log File: gateway.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
	LogTimeFormat  string `mapstructure:"LOG_TIME_FORMAT"`  // Log time format: RFC3339

	// Admin related
	BindAdminAPI   int    `mapstructure:"BIND_ADMIN_API"`   // Port number to bind to for admin secured HTTP connection
	SystemDir      string `mapstructure:"SYSTEM_DIR"`       // // Dir storing all data of this gateway
	RetrievalDir   string `mapstructure:"RETRIEVAL_DIR"`    // Retrieval Dir: /var/.fc-retrieval/gateway/files
	AdminKeyFile   string `mapstructure:"ADMIN_KEY_FILE"`   // File storing the admin access key file
	ConfigFile     string `mapstructure:"CONFIG_FILE"`      // File storing the gateway config
	StoreFullOffer bool   `mapstructure:"STORE_FULL_OFFER"` // Boolean indicates whether this gateway stores full offer

	// Duration
	SyncDuration             time.Duration `mapstructure:"SYNC_DURATION"`               // Sync duration
	MsgKeyUpdateDuration     time.Duration `mapstructure:"MSG_KEY_UPDATE_DURATION"`     // Msg key update duration
	TCPInactivityTimeout     time.Duration `mapstructure:"TCP_INACTIVITY_TIMEOUT"`      // TCP inactivity timeout
	TCPLongInactivityTimeout time.Duration `mapstructure:"TCP_LONG_INACTIVITY_TIMEOUT"` // TCP long inactivity timeout

	// Price, this is not configurable at the moment.
	SearchPrice *big.Int `mapstructure:"SEARCH_PRICE"` // Search price
	OfferPrice  *big.Int `mapstructure:"OFFER_PRICE"`  // Offer price
	TopupAmount *big.Int `mapstructure:"TOPUP_AMOUNT"` // 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