config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath added in v1.0.3

func DefaultPath() string

DefaultPath gives back the path to a default location in user HOME to be used for Elrond application storage

Types

type AddressConfig

type AddressConfig struct {
	Length int    `json:"length"`
	Prefix string `json:"prefix"`
}

AddressConfig will map the json address configuration

type BloomFilterConfig

type BloomFilterConfig struct {
	Size     uint     `json:"size"`
	HashFunc []string `json:"hashFunc"`
}

BloomFilterConfig will map the json bloom filter configuration

type CacheConfig

type CacheConfig struct {
	Size   uint32 `json:"size"`
	Type   string `json:"type"`
	Shards uint32 `json:"shards"`
}

CacheConfig will map the json cache configuration

type Config

type Config struct {
	MiniBlocksStorage          StorageConfig
	PeerBlockBodyStorage       StorageConfig
	BlockHeaderStorage         StorageConfig
	TxStorage                  StorageConfig
	SmartContractResultStorage StorageConfig
	ShardHdrNonceHashStorage   StorageConfig
	MetaHdrNonceHashStorage    StorageConfig

	ShardDataStorage StorageConfig
	MetaBlockStorage StorageConfig
	PeerDataStorage  StorageConfig

	AccountsTrieStorage StorageConfig
	BadBlocksCache      CacheConfig

	TxBlockBodyDataPool       CacheConfig
	StateBlockBodyDataPool    CacheConfig
	PeerBlockBodyDataPool     CacheConfig
	BlockHeaderDataPool       CacheConfig
	BlockHeaderNoncesDataPool CacheConfig
	TxDataPool                CacheConfig
	SmartContractDataPool     CacheConfig
	MetaBlockBodyDataPool     CacheConfig

	MiniBlockHeaderHashesDataPool CacheConfig
	ShardHeadersDataPool          CacheConfig
	MetaHeaderNoncesDataPool      CacheConfig

	Logger         LoggerConfig
	Address        AddressConfig
	Hasher         TypeConfig
	MultisigHasher TypeConfig
	Marshalizer    TypeConfig

	ResourceStats   ResourceStatsConfig
	Heartbeat       HeartbeatConfig
	GeneralSettings GeneralSettingsConfig
	Consensus       TypeConfig
	Explorer        ExplorerConfig

	NTPConfig NTPConfig
}

Config will hold the entire application configuration parameters

type DBConfig

type DBConfig struct {
	FilePath          string `json:"file"`
	Type              string `json:"type"`
	BatchDelaySeconds int    `json:"batchDelaySeconds"`
	MaxBatchSize      int    `json:"maxBatchSize"`
}

DBConfig will map the json db configuration

type ElasticSearchConfig

type ElasticSearchConfig struct {
	Username string
	Password string
}

ElasticSearchConfig will hold the configuration for the elastic search

type ExplorerConfig added in v1.0.3

type ExplorerConfig struct {
	Enabled    bool
	IndexerURL string
}

ExplorerConfig will hold the configuration for the explorer indexer

type FacadeConfig

type FacadeConfig struct {
	RestApiPort string
}

FacadeConfig will hold different configuration option that will be passed to the main ElrondFacade

type GeneralSettingsConfig

type GeneralSettingsConfig struct {
	DestinationShardAsObserver string
}

GeneralSettingsConfig will hold the general settings for a node

type HeartbeatConfig

type HeartbeatConfig struct {
	Enabled                             bool
	MinTimeToWaitBetweenBroadcastsInSec int
	MaxTimeToWaitBetweenBroadcastsInSec int
	DurationInSecToConsiderUnresponsive int
}

HeartbeatConfig will hold all heartbeat settings

type KadDhtPeerDiscoveryConfig

type KadDhtPeerDiscoveryConfig struct {
	Enabled              bool
	RefreshIntervalInSec int
	RandezVous           string
	InitialPeerList      []string
}

KadDhtPeerDiscoveryConfig will hold the kad-dht discovery config settings

type LoggerConfig added in v1.0.3

type LoggerConfig struct {
	Path            string `json:"path"`
	StackTraceDepth int    `json:"stackTraceDepth"`
}

LoggerConfig will map the json logger configuration

type MdnsPeerDiscoveryConfig added in v1.0.3

type MdnsPeerDiscoveryConfig struct {
	Enabled              bool
	RefreshIntervalInSec int
	ServiceTag           string
}

MdnsPeerDiscoveryConfig will hold the mdns discovery config settings

type NTPConfig

type NTPConfig struct {
	Host    string
	Port    int
	Timeout time.Duration
	Version int
}

NTPConfig will hold the configuration for NTP queries

type NodeConfig

type NodeConfig struct {
	Port int
	Seed string
}

NodeConfig will hold basic p2p settings

type P2PConfig

type P2PConfig struct {
	Node                NodeConfig
	MdnsPeerDiscovery   MdnsPeerDiscoveryConfig
	KadDhtPeerDiscovery KadDhtPeerDiscoveryConfig
}

P2PConfig will hold all the P2P settings

type ResourceStatsConfig

type ResourceStatsConfig struct {
	Enabled              bool
	RefreshIntervalInSec int
}

ResourceStatsConfig will hold all resource stats settings

type ServersConfig added in v1.0.3

type ServersConfig struct {
	ElasticSearch ElasticSearchConfig
}

ServersConfig will hold all the confidential settings for servers

type StorageConfig

type StorageConfig struct {
	Cache CacheConfig       `json:"cache"`
	DB    DBConfig          `json:"db"`
	Bloom BloomFilterConfig `json:"bloom"`
}

StorageConfig will map the json storage unit configuration

type TypeConfig

type TypeConfig struct {
	Type string `json:"type"`
}

TypeConfig will map the json string type configuration

Jump to

Keyboard shortcuts

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