settings

package
v0.0.0-...-71850de Latest Latest
Warning

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

Go to latest
Published: Jul 30, 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 = 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: 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
	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 provider
	RetrievalDir string `mapstructure:"RETRIEVAL_DIR"`  // Retrieval Dir: /var/.fc-retrieval/provider/files
	AdminKeyFile string `mapstructure:"ADMIN_KEY_FILE"` // File storing the admin access key file
	ConfigFile   string `mapstructure:"CONFIG_FILE"`    // File storing the provider config

	// 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
}

AppSettings defines the server configuraiton

Jump to

Keyboard shortcuts

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