Documentation ¶
Index ¶
- type DefaultHolder
- func (d *DefaultHolder) Add(hash common.Hash128, entry interface{}, shardId common.ShardId, ...)
- func (d *DefaultHolder) Get(hash common.Hash128) (entry interface{}, id common.ShardId, highPriority bool, present bool)
- func (d *DefaultHolder) Has(hash common.Hash128) bool
- func (d *DefaultHolder) MaxParallelPulls() uint32
- func (d *DefaultHolder) PushTracker() PendingPushTracker
- func (d *DefaultHolder) SupportPendingRequests() bool
- type DefaultPushTracker
- func (d *DefaultPushTracker) AddPendingPush(id peer.ID, hash common.Hash128)
- func (d *DefaultPushTracker) RegisterPull(hash common.Hash128)
- func (d *DefaultPushTracker) RemovePull(hash common.Hash128)
- func (d *DefaultPushTracker) Requests() chan PendingPulls
- func (d *DefaultPushTracker) Run()
- func (d *DefaultPushTracker) SetHolder(holder Holder)
- type Holder
- type PendingPulls
- type PendingPushTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHolder ¶
type DefaultHolder struct {
// contains filtered or unexported fields
}
func (*DefaultHolder) MaxParallelPulls ¶
func (d *DefaultHolder) MaxParallelPulls() uint32
func (*DefaultHolder) PushTracker ¶
func (d *DefaultHolder) PushTracker() PendingPushTracker
func (*DefaultHolder) SupportPendingRequests ¶
func (d *DefaultHolder) SupportPendingRequests() bool
type DefaultPushTracker ¶
type DefaultPushTracker struct {
// contains filtered or unexported fields
}
func NewDefaultPushTracker ¶
func NewDefaultPushTracker(pullDelay time.Duration) *DefaultPushTracker
func (*DefaultPushTracker) AddPendingPush ¶
func (d *DefaultPushTracker) AddPendingPush(id peer.ID, hash common.Hash128)
func (*DefaultPushTracker) RegisterPull ¶
func (d *DefaultPushTracker) RegisterPull(hash common.Hash128)
func (*DefaultPushTracker) RemovePull ¶
func (d *DefaultPushTracker) RemovePull(hash common.Hash128)
func (*DefaultPushTracker) Requests ¶
func (d *DefaultPushTracker) Requests() chan PendingPulls
func (*DefaultPushTracker) Run ¶
func (d *DefaultPushTracker) Run()
func (*DefaultPushTracker) SetHolder ¶
func (d *DefaultPushTracker) SetHolder(holder Holder)
type Holder ¶
type Holder interface { Add(hash common.Hash128, entry interface{}, shardId common.ShardId, highPriority bool) Has(hash common.Hash128) bool Get(hash common.Hash128) (entry interface{}, shardId common.ShardId, highPriority bool, present bool) MaxParallelPulls() uint32 SupportPendingRequests() bool PushTracker() PendingPushTracker }
func NewDefaultHolder ¶
func NewDefaultHolder(maxPulls int, pushTracker PendingPushTracker) Holder
Click to show internal directories.
Click to hide internal directories.