Documentation ¶
Index ¶
- Constants
- func InitCache(sharders *NodeHolder)
- type Node
- type NodeHolder
- func (h *NodeHolder) All() (res []string)
- func (h *NodeHolder) Fail(id string)
- func (h *NodeHolder) GetBalanceFieldFromSharders(clientID, name string) (int64, string, error)
- func (h *NodeHolder) GetBlockByRound(ctx context.Context, numSharders int, round int64) (b *block.Block, err error)
- func (h *NodeHolder) GetHardForkRound(hardFork string) (int64, error)
- func (h *NodeHolder) GetNonceFromSharders(clientID string) (int64, string, error)
- func (h *NodeHolder) GetRoundFromSharders() (int64, error)
- func (h *NodeHolder) Healthy() (res []string)
- func (h *NodeHolder) QueryFromSharders(numSharders int, query string, result chan *util.GetResponse)
- func (h *NodeHolder) QueryFromShardersContext(ctx context.Context, numSharders int, query string, ...)
- func (h *NodeHolder) Success(id string)
- type NonceCache
Constants ¶
View Source
const ( GET_BALANCE = `/v1/client/get/balance?client_id=` CURRENT_ROUND = "/v1/current-round" GET_BLOCK_INFO = `/v1/block/get?` GET_HARDFORK_ROUND = `/v1/screst/6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d9/hardfork?name=` )
Variables ¶
This section is empty.
Functions ¶
func InitCache ¶
func InitCache(sharders *NodeHolder)
Types ¶
type NodeHolder ¶
type NodeHolder struct {
// contains filtered or unexported fields
}
func NewHolder ¶
func NewHolder(nodes []string, consensus int) *NodeHolder
func (*NodeHolder) All ¶
func (h *NodeHolder) All() (res []string)
func (*NodeHolder) Fail ¶
func (h *NodeHolder) Fail(id string)
func (*NodeHolder) GetBalanceFieldFromSharders ¶
func (h *NodeHolder) GetBalanceFieldFromSharders(clientID, name string) (int64, string, error)
func (*NodeHolder) GetBlockByRound ¶
func (*NodeHolder) GetHardForkRound ¶ added in v1.12.1
func (h *NodeHolder) GetHardForkRound(hardFork string) (int64, error)
func (*NodeHolder) GetNonceFromSharders ¶
func (h *NodeHolder) GetNonceFromSharders(clientID string) (int64, string, error)
func (*NodeHolder) GetRoundFromSharders ¶
func (h *NodeHolder) GetRoundFromSharders() (int64, error)
func (*NodeHolder) Healthy ¶
func (h *NodeHolder) Healthy() (res []string)
func (*NodeHolder) QueryFromSharders ¶
func (h *NodeHolder) QueryFromSharders(numSharders int, query string, result chan *util.GetResponse)
func (*NodeHolder) QueryFromShardersContext ¶
func (h *NodeHolder) QueryFromShardersContext(ctx context.Context, numSharders int, query string, result chan *util.GetResponse)
func (*NodeHolder) Success ¶
func (h *NodeHolder) Success(id string)
type NonceCache ¶
type NonceCache struct {
// contains filtered or unexported fields
}
var Cache *NonceCache
func (*NonceCache) Evict ¶
func (nc *NonceCache) Evict(clientId string)
func (*NonceCache) GetNextNonce ¶
func (nc *NonceCache) GetNextNonce(clientId string) int64
func (*NonceCache) Set ¶
func (nc *NonceCache) Set(clientId string, nonce int64)
Click to show internal directories.
Click to hide internal directories.