github.com/netdata/go.d.plugin@v0.58.1/modules/energid/metrics.go (about) 1 // SPDX-License-Identifier: GPL-3.0-or-later 2 3 package energid 4 5 // API docs: https://github.com/energicryptocurrency/core-api-documentation 6 7 type energidInfo struct { 8 Blockchain *blockchainInfo `stm:"blockchain"` 9 MemPool *memPoolInfo `stm:"mempool"` 10 Network *networkInfo `stm:"network"` 11 TxOutSet *txOutSetInfo `stm:"utxo"` 12 Memory *memoryInfo `stm:"secmem"` 13 } 14 15 // https://github.com/energicryptocurrency/core-api-documentation#getblockchaininfo 16 type blockchainInfo struct { 17 Blocks float64 `stm:"blocks" json:"blocks"` 18 Headers float64 `stm:"headers" json:"headers"` 19 Difficulty float64 `stm:"difficulty,1000,1" json:"difficulty"` 20 } 21 22 // https://github.com/energicryptocurrency/core-api-documentation#getmempoolinfo 23 type memPoolInfo struct { 24 Bytes float64 `stm:"txsize" json:"bytes"` 25 Usage float64 `stm:"current" json:"usage"` 26 MaxMemPool float64 `stm:"max" json:"maxmempool"` 27 } 28 29 // https://github.com/energicryptocurrency/core-api-documentation#getnetworkinfo 30 type networkInfo struct { 31 TimeOffset float64 `stm:"timeoffset" json:"timeoffset"` 32 Connections float64 `stm:"connections" json:"connections"` 33 } 34 35 // https://github.com/energicryptocurrency/core-api-documentation#gettxoutsetinfo 36 type txOutSetInfo struct { 37 Transactions float64 `stm:"transactions" json:"transactions"` 38 TxOuts float64 `stm:"output_transactions" json:"txouts"` 39 } 40 41 // undocumented 42 type memoryInfo struct { 43 Locked struct { 44 Used float64 `stm:"used" json:"used"` 45 Free float64 `stm:"free" json:"free"` 46 Total float64 `stm:"total" json:"total"` 47 Locked float64 `stm:"locked" json:"locked"` 48 } `stm:"" json:"locked"` 49 }