config

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) string

Get - Get config value by key

func GetBool added in v0.5.0

func GetBool(key string) bool

GetBool - Parses config value as boolean & returns

func GetBootstrapPeer added in v0.5.0

func GetBootstrapPeer() string

GetBootstrapPeer - Attempts to get user supplied bootstrap node identifier so that this node can connect to it

func GetConcurrencyFactor

func GetConcurrencyFactor() int

GetConcurrencyFactor - Size of worker pool, is dictated by rule below

@note You can set floating point value for `ConcurrencyFactor` ( > 0 )

func GetFloat

func GetFloat(key string) float64

GetFloat - Parse confiig value as floating point number & return

func GetMemPoolPollingPeriod

func GetMemPoolPollingPeriod() uint64

GetMemPoolPollingPeriod - Read mempool polling period & attempt to parse it to string, where it's expected that this period will be provided in form of time duration with millisecond level precision

Example: If you want to poll mempool content every 2 seconds, you must be writing 2000 in `.env` file

If you don't provide any value for this expected field, by default it'll start using 1000ms i.e. after completion of this iteration, it'll sleep for 1000ms & again get to work

func GetNetworkingChoice added in v0.5.0

func GetNetworkingChoice() bool

GetNetworkingChoice - Consider configuring value for this field so that you can express your desire for joining a larger pool of `harmony` nodes, to get a much broader view of mempool

Consider putting `true`, if you're interested, otherwise ignore

func GetNetworkingPort added in v0.5.0

func GetNetworkingPort() uint64

GetNetworkingPort - Libp2p service to be run on this port, used for communicating with peers over P2P network

func GetNetworkingRendezvous added in v0.5.0

func GetNetworkingRendezvous() string

GetNetworkingRendezvous - This is the string with which harmony nodes will advertise them with & this node will attempt to find other peers of same kind using this string

func GetNetworkingStream added in v0.5.0

func GetNetworkingStream() string

GetNetworkingStream - Libp2p stream name, to be for listening on this & also sending messages when communicating with peer

func GetPeerDiscoveryMode added in v0.5.0

func GetPeerDiscoveryMode() uint64

GetPeerDiscoveryMode - Kademlia DHT peer discovery mode 1 => Client mode 2 => Server mode ( This peer can act an rendezvous point )

func GetPendingPoolSize added in v0.8.0

func GetPendingPoolSize() uint64

GetPendingPoolSize - Max #-of pending pool txs can be living in memory

func GetPendingTxEntryPublishTopic

func GetPendingTxEntryPublishTopic() string

GetPendingTxEntryPublishTopic - Read provided topic name from `.env` file where newly added pending pool tx(s) to be published

func GetPendingTxExitPublishTopic

func GetPendingTxExitPublishTopic() string

GetPendingTxExitPublishTopic - Read provided topic name from `.env` file where tx(s) removed from pending pool to be published

func GetPortNumber

func GetPortNumber() uint64

GetPortNumber - Attempts to read user preferred port number for running harmony as a service, if failing/ port lesser than 1024 uses default value `7000`

func GetPub0SubAddress added in v0.9.5

func GetPub0SubAddress() string

Pub0Sub's 0hub server running on address port, to be used for pub/sub message passing purpose

func GetQueuedPoolSize added in v0.8.0

func GetQueuedPoolSize() uint64

GetQueuedPoolSize - Max #-of queued pool txs can be living in memory

func GetQueuedTxEntryPublishTopic

func GetQueuedTxEntryPublishTopic() string

GetQueuedTxEntryPublishTopic - Read provided topic name from `.env` file where newly added queued pool tx(s) to be published

func GetQueuedTxExitPublishTopic

func GetQueuedTxExitPublishTopic() string

GetQueuedTxExitPublishTopic - Read provided topic name from `.env` file where tx(s) removed from queued pool to be published

func GetUint

func GetUint(key string) uint64

GetUint - Parses value as uint64 & returns response

func Read

func Read(file string) error

Read - Reading .env file content, during application start up

Types

This section is empty.

Jump to

Keyboard shortcuts

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