Documentation ¶
Index ¶
Constants ¶
View Source
const ( // the address of the coordinator CfgCoordinatorAddress = "coordinator.address" // the security level used in coordinator signatures CfgCoordinatorSecurityLevel = "coordinator.securityLevel" // the depth of the Merkle tree which in turn determines the number of leaves (private keys) that the coordinator can use to sign a message. CfgCoordinatorMerkleTreeDepth = "coordinator.merkleTreeDepth" // the minimum weight magnitude is the number of trailing 0s that must appear in the end of a transaction hash. // increasing this number by 1 will result in proof of work that is 3 times as hard. CfgCoordinatorMWM = "coordinator.mwm" // the path to the state file of the coordinator CfgCoordinatorStateFilePath = "coordinator.stateFilePath" // the path to the Merkle tree of the coordinator CfgCoordinatorMerkleTreeFilePath = "coordinator.merkleTreeFilePath" // the interval milestones are issued CfgCoordinatorIntervalSeconds = "coordinator.intervalSeconds" // the amount of checkpoints issued between two milestones CfgCoordinatorCheckpointTransactions = "coordinator.checkpointTransactions" )
View Source
const ( // the bind address on which the dashboard can be access from CfgDashboardBindAddress = "dashboard.bindAddress" // whether to run the dashboard in dev mode CfgDashboardDevMode = "dashboard.dev" // the theme for the dashboard to use (default or dark) CfgDashboardTheme = "dashboard.theme" // whether to use HTTP basic auth CfgDashboardBasicAuthEnabled = "dashboard.basicAuth.enabled" // the HTTP basic auth username CfgDashboardBasicAuthUsername = "dashboard.basicAuth.username" // the HTTP basic auth password+salt as a sha256 hash CfgDashboardBasicAuthPasswordHash = "dashboard.basicauth.passwordhash" // config key must be lower cased (for hiding passwords in PrintConfig) // the HTTP basic auth salt used for hashing the password CfgDashboardBasicAuthPasswordSalt = "dashboard.basicauth.passwordsalt" // config key must be lower cased (for hiding passwords in PrintConfig) )
View Source
const ( // the path to the visualizer web assets CfgGraphWebRootPath = "graph.webRootPath" // the websocket URI to use (optional) CfgGraphWebSocketURI = "graph.webSocket.uri" // sets the domain name from which the visualizer is served from CfgGraphDomain = "graph.domain" // the bind address from which the visualizer can be accessed from CfgGraphBindAddress = "graph.bindAddress" // the name of the network to be shown on the visualizer site CfgGraphNetworkName = "graph.networkName" // the explorer transaction link CfgGraphExplorerTxLink = "graph.explorerTxLink" // the explorer bundle link CfgGraphExplorerBundleLink = "graph.explorerBundleLink" )
View Source
const ( // path to the tanglemonitor web assets CfgMonitorTangleMonitorPath = "monitor.tangleMonitorPath" // the domain from which the tanglemonitor is served from CfgMonitorDomain = "monitor.domain" // the websocket URI to use (optional) CfgMonitorWebSocketURI = "monitor.webSocket.uri" // the remote API port CfgMonitorRemoteAPIPort = "monitor.remoteAPIPort" // the initial amount of tx to load CfgMonitorInitialTransactions = "monitor.initialTransactions" // the bind address on which the monitor can be access from CfgMonitorWebBindAddress = "monitor.webBindAddress" // the bind address on which the API listens on CfgMonitorAPIBindAddress = "monitor.apiBindAddress" )
View Source
const ( // Defines if IPv6 is preferred for peers added through the API CfgNetPreferIPv6 = "network.preferIPv6" // the bind address of the gossip TCP server CfgNetGossipBindAddress = "network.gossip.bindAddress" // the number of seconds to wait before trying to reconnect to a disconnected peer CfgNetGossipReconnectAttemptIntervalSeconds = "network.gossip.reconnectAttemptIntervalSeconds" // enable inbound connections from unknown peers CfgPeeringAcceptAnyConnection = "acceptAnyConnection" // set the maximum number of peers CfgPeeringMaxPeers = "maxPeers" // set the URLs and IP addresses of peers CfgPeers = "peers" // list of autopeering entry nodes to use CfgNetAutopeeringEntryNodes = "network.autopeering.entryNodes" // bind address for global services such as autopeering and gossip CfgNetAutopeeringBindAddr = "network.autopeering.bindAddress" // private key seed used to derive the node identity; optional Base64 encoded 256-bit string CfgNetAutopeeringSeed = "network.autopeering.seed" // whether the node should act as an autopeering entry node CfgNetAutopeeringRunAsEntryNode = "network.autopeering.runAsEntryNode" // the number of inbound autopeers CfgNetAutopeeringInboundPeers = "network.autopeering.inboundPeers" // the number of outbound autopeers CfgNetAutopeeringOutboundPeers = "network.autopeering.outboundPeers" // lifetime (in minutes) of the private and public local salt CfgNetAutopeeringSaltLifetime = "network.autopeering.saltLifetime" )
View Source
const ( // CfgNodeAlias set an alias to identify a node CfgNodeAlias = "node.alias" // CfgNodeShowAliasInGetNodeInfo defines whether to show the alias in getNodeInfo CfgNodeShowAliasInGetNodeInfo = "node.showAliasInGetNodeInfo" )
View Source
const ( // the bind address on which the Prometheus exporter listens on CfgPrometheusBindAddress = "prometheus.bindAddress" // include go metrics CfgPrometheusGoMetrics = "prometheus.goMetrics" // include process metrics CfgPrometheusProcessMetrics = "prometheus.processMetrics" // include promhttp metrics CfgPrometheusPromhttpMetrics = "prometheus.promhttpMetrics" // whether the plugin should write a Prometheus 'file SD' file CfgPrometheusFileServiceDiscoveryEnabled = "prometheus.fileServiceDiscovery.enabled" // the path where to write the 'file SD' file to CfgPrometheusFileServiceDiscoveryPath = "prometheus.fileServiceDiscovery.path" // the target to write into the 'file SD' file CfgPrometheusFileServiceDiscoveryTarget = "prometheus.fileServiceDiscovery.target" )
View Source
const ( // which snapshot type to load. 'local' or 'global' CfgSnapshotLoadType = "snapshots.loadType" // the depth, respectively the starting point, at which a local snapshot of the ledger is generated CfgLocalSnapshotsDepth = "snapshots.local.depth" // interval, in milestone transactions, at which snapshot files are created if the ledger is fully synchronized CfgLocalSnapshotsIntervalSynced = "snapshots.local.intervalSynced" // interval, in milestone transactions, at which snapshot files are created if the ledger is not fully synchronized CfgLocalSnapshotsIntervalUnsynced = "snapshots.local.intervalUnsynced" // path to the local snapshot file CfgLocalSnapshotsPath = "snapshots.local.path" // URL to load the local snapshot file from CfgLocalSnapshotsDownloadURL = "snapshots.local.downloadURL" // path to the global snapshot file containing the ledger state CfgGlobalSnapshotPath = "snapshots.global.path" // paths to the spent addresses files CfgGlobalSnapshotSpentAddressesPaths = "snapshots.global.spentAddressesPaths" // milestone index of the global snapshot CfgGlobalSnapshotIndex = "snapshots.global.index" // whether to delete old transaction data from the database CfgPruningEnabled = "snapshots.pruning.enabled" // amount of milestone transactions to keep in the database CfgPruningDelay = "snapshots.pruning.delay" // enable support for wereAddressesSpentFrom (needed for Trinity, but local snapshots are much bigger) CfgSpentAddressesEnabled = "spentAddresses.enabled" )
View Source
const ( // the target address of the spam CfgSpammerAddress = "spammer.address" // the message to embed within the spam transactions CfgSpammerMessage = "spammer.message" // the tag of the transaction CfgSpammerTag = "spammer.tag" // the depth to use for tip-selection CfgSpammerDepth = "spammer.depth" // workers remains idle for a while when cpu usage gets over this limit (0 = disable) CfgSpammerCPUMaxUsage = "spammer.cpuMaxUsage" // the rate limit for the spammer (0 = no limit) CfgSpammerTPSRateLimit = "spammer.tpsRateLimit" // the size of the spam bundles CfgSpammerBundleSize = "spammer.bundleSize" // should be spammed with value bundles CfgSpammerValueSpam = "spammer.valueSpam" // the amount of parallel running spammers CfgSpammerWorkers = "spammer.workers" )
View Source
const ( // the path to the database folder CfgDatabasePath = "db.path" // ignore the check for corrupted databases (should only be used for debug reasons) CfgDatabaseDebug = "db.debug" )
View Source
const ( // the max allowed depth to be used as the starting point for tip-selection CfgTipSelMaxDepth = "tipsel.maxDepth" // the limit defining the max amount of transactions to traverse in order to check // whether a transaction references a transaction below max depth CfgTipSelBelowMaxDepthTransactionLimit = "tipsel.belowMaxDepthTransactionLimit" )
View Source
const ( // the bind address on which the HTTP API listens on CfgWebAPIBindAddress = "httpAPI.bindAddress" // the allowed HTTP API calls which can be called from non whitelisted addresses CfgWebAPIPermitRemoteAccess = "httpAPI.permitRemoteAccess" // the whitelist of addresses which are allowed to access the HTTP API CfgWebAPIWhitelistedAddresses = "httpAPI.whitelistedAddresses" // whether to allow the health check route anyways CfgWebAPIExcludeHealthCheckFromAuth = "httpAPI.excludeHealthCheckFromAuth" // whether to use HTTP basic auth for the HTTP API CfgWebAPIBasicAuthEnabled = "httpAPI.basicAuth.enabled" // the username of the HTTP basic auth CfgWebAPIBasicAuthUsername = "httpAPI.basicAuth.username" // the HTTP basic auth password+salt as a sha256 hash CfgWebAPIBasicAuthPasswordHash = "httpapi.basicauth.passwordhash" // must be lower cased // the HTTP basic auth salt used for hashing the password CfgWebAPIBasicAuthPasswordSalt = "httpapi.basicauth.passwordsalt" // must be lower cased // the maximum number of characters that the body of an API call may contain CfgWebAPILimitsMaxBodyLengthBytes = "httpAPI.limits.bodyLengthBytes" // the maximum number of transactions that may be returned by the findTransactions endpoint CfgWebAPILimitsMaxFindTransactions = "httpAPI.limits.findTransactions" // the maximum number of trytes that may be returned by the getTrytes endpoint CfgWebAPILimitsMaxGetTrytes = "httpAPI.limits.getTrytes" // the maximum number of parameters in an API call CfgWebAPILimitsMaxRequestsList = "httpAPI.limits.requestsList" )
View Source
const ( // protocol used to connect to the zmq feed [unix, tcp, udp, inproc] CfgZMQBindAddress = "zmq.bindAddress" // the bind address of the ZMQ feed CfgZMQProtocol = "zmq.protocol" )
View Source
const (
// path to the MQTT broker config file
CfgMQTTConfig = "mqtt.config"
)
View Source
const (
// the bind address on which the profiler listens on
CfgProfilingBindAddress = "profiling.bindAddress"
)
Variables ¶
Functions ¶
func AcquirePeeringConfigHotReload ¶
func AcquirePeeringConfigHotReload() bool
func AllowPeeringConfigHotReload ¶
func AllowPeeringConfigHotReload()
func DenyPeeringConfigHotReload ¶
func DenyPeeringConfigHotReload()
func FetchConfig ¶
func FetchConfig() error
FetchConfig fetches config values from a dir defined via CLI flag --config-dir (or the current working dir if not set).
It automatically reads in a single config file starting with "config" (can be changed via the --config CLI flag) and ending with: .json, .toml, .yaml or .yml (in this sequence).
func LoadHashFromEnvironment ¶
LoadHashFromEnvironment loads a hash from the given environment variable.
func PrintConfig ¶
func PrintConfig(ignoreSettingsAtPrint ...[]string)
Types ¶
type PeerConfig ¶
type PeerConfig struct { ID string `json:"identity" mapstructure:"identity"` Alias string `json:"alias" mapstructure:"alias"` PreferIPv6 bool `json:"preferIPv6" mapstructure:"preferIPv6"` }
PeerConfig holds the initial information about peers.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.