Documentation ¶
Index ¶
- Constants
- func GetGovernanceView(backend *ledger.Ledger) (*governance.GovernanceView, error)
- func GetPeersConfig(backend *ledger.Ledger, view uint32) ([]*config.VBFTPeerStakeInfo, uint32, error)
- type GovCache
- type GovNodeLedgerResolver
- type GovNodeMockResolver
- type GovNodeResolver
- type HostsCache
- type HostsResolver
- type Parker
Constants ¶
View Source
const GovNodeCacheTime = time.Minute * 10
View Source
const HostsResolverCacheTime = time.Minute * 10
Variables ¶
This section is empty.
Functions ¶
func GetGovernanceView ¶
func GetGovernanceView(backend *ledger.Ledger) (*governance.GovernanceView, error)
func GetPeersConfig ¶
Types ¶
type GovNodeLedgerResolver ¶
type GovNodeLedgerResolver struct {
// contains filtered or unexported fields
}
func NewGovNodeResolver ¶
func NewGovNodeResolver(db *ledger.Ledger) *GovNodeLedgerResolver
func (*GovNodeLedgerResolver) IsGovNode ¶
func (self *GovNodeLedgerResolver) IsGovNode(pubKey string) bool
func (*GovNodeLedgerResolver) IsGovNodePubKey ¶
func (self *GovNodeLedgerResolver) IsGovNodePubKey(key keypair.PublicKey) bool
type GovNodeMockResolver ¶
type GovNodeMockResolver struct {
// contains filtered or unexported fields
}
func NewGovNodeMockResolver ¶
func NewGovNodeMockResolver(gov []string) *GovNodeMockResolver
func (*GovNodeMockResolver) IsGovNode ¶
func (self *GovNodeMockResolver) IsGovNode(key string) bool
func (*GovNodeMockResolver) IsGovNodePubKey ¶
func (self *GovNodeMockResolver) IsGovNodePubKey(key keypair.PublicKey) bool
type GovNodeResolver ¶
type HostsCache ¶
type HostsCache struct {
// contains filtered or unexported fields
}
type HostsResolver ¶
type HostsResolver struct {
// contains filtered or unexported fields
}
host resolver with cache
func NewHostsResolver ¶
func NewHostsResolver(hosts []string) (*HostsResolver, []string)
func (*HostsResolver) GetHostAddrs ¶
func (self *HostsResolver) GetHostAddrs() []string
Click to show internal directories.
Click to hide internal directories.