Documentation ¶
Index ¶
- Variables
- func ComputeSizeOfTxs(marshalizer marshal.Marshalizer, txs map[string]data.TransactionHandler) int
- type RoundInfo
- type ValidatorRatingInfo
- type WorkItemHandler
- func NewItemAccounts(indexer saveAccountsIndexer, accounts []state.UserAccountHandler) WorkItemHandler
- func NewItemBlock(indexer saveBlockIndexer, marshalizer marshal.Marshalizer, ...) WorkItemHandler
- func NewItemRating(indexer saveRatingIndexer, indexID string, infoRating []ValidatorRatingInfo) WorkItemHandler
- func NewItemRemoveBlock(indexer removeIndexer, bodyHandler data.BodyHandler, ...) WorkItemHandler
- func NewItemRounds(indexer saveRounds, roundsInfo []RoundInfo) WorkItemHandler
- func NewItemTpsBenchmark(indexer saveTpsBenchmark, tpsBenchmark statistics.TPSBenchmark) WorkItemHandler
- func NewItemValidators(indexer saveValidatorsIndexer, epoch uint32, ...) WorkItemHandler
Constants ¶
This section is empty.
Variables ¶
var ErrBodyTypeAssertion = errors.New("elasticsearch - body type assertion failed")
ErrBodyTypeAssertion signals that body type assertion failed
Functions ¶
func ComputeSizeOfTxs ¶
func ComputeSizeOfTxs(marshalizer marshal.Marshalizer, txs map[string]data.TransactionHandler) int
ComputeSizeOfTxs will compute size of transactions in bytes
Types ¶
type RoundInfo ¶
type RoundInfo struct { Index uint64 `json:"round"` SignersIndexes []uint64 `json:"signersIndexes"` BlockWasProposed bool `json:"blockWasProposed"` ShardId uint32 `json:"shardId"` Timestamp time.Duration `json:"timestamp"` }
RoundInfo is a structure containing block signers and shard id
type ValidatorRatingInfo ¶
type ValidatorRatingInfo struct { PublicKey string `json:"publicKey"` Rating float32 `json:"rating"` }
ValidatorRatingInfo is a structure containing validator rating information
type WorkItemHandler ¶
WorkItemHandler defines the interface for item that needs to be saved in elasticsearch database
func NewItemAccounts ¶
func NewItemAccounts( indexer saveAccountsIndexer, accounts []state.UserAccountHandler, ) WorkItemHandler
NewItemAccounts will create a new instance of itemAccounts
func NewItemBlock ¶
func NewItemBlock( indexer saveBlockIndexer, marshalizer marshal.Marshalizer, bodyHandler data.BodyHandler, headerHandler data.HeaderHandler, txPool map[string]data.TransactionHandler, signersIndexes []uint64, notarizedHeadersHashes []string, headerHash []byte, ) WorkItemHandler
NewItemBlock will create a new instance of ItemBlock
func NewItemRating ¶
func NewItemRating(indexer saveRatingIndexer, indexID string, infoRating []ValidatorRatingInfo) WorkItemHandler
NewItemRating will create a new instance of itemRating
func NewItemRemoveBlock ¶
func NewItemRemoveBlock( indexer removeIndexer, bodyHandler data.BodyHandler, headerHandler data.HeaderHandler, ) WorkItemHandler
NewItemRemoveBlock will create a new instance of itemRemoveBlock
func NewItemRounds ¶
func NewItemRounds(indexer saveRounds, roundsInfo []RoundInfo) WorkItemHandler
NewItemRounds will create a new instance of itemRounds
func NewItemTpsBenchmark ¶
func NewItemTpsBenchmark(indexer saveTpsBenchmark, tpsBenchmark statistics.TPSBenchmark) WorkItemHandler
NewItemTpsBenchmark will create a new instance of itemTpsBenchmark
func NewItemValidators ¶
func NewItemValidators( indexer saveValidatorsIndexer, epoch uint32, validatorsPubKeys map[uint32][][]byte, ) WorkItemHandler
NewItemValidators will create a new instance of itemValidators