Documentation ¶
Overview ¶
package wantlist implements an object for bitswap that contains the keys that a given peer wants.
Index ¶
- type Entry
- type ThreadSafe
- func (w *ThreadSafe) Add(k *cid.Cid, priority int) bool
- func (w *ThreadSafe) AddEntry(e *Entry) bool
- func (w *ThreadSafe) Contains(k *cid.Cid) (*Entry, bool)
- func (w *ThreadSafe) Entries() []*Entry
- func (w *ThreadSafe) Len() int
- func (w *ThreadSafe) Remove(k *cid.Cid) bool
- func (w *ThreadSafe) SortedEntries() []*Entry
- type Wantlist
- func (w *Wantlist) Add(c *cid.Cid, priority int) bool
- func (w *Wantlist) AddEntry(e *Entry) bool
- func (w *Wantlist) Contains(k *cid.Cid) (*Entry, bool)
- func (w *Wantlist) Entries() []*Entry
- func (w *Wantlist) Len() int
- func (w *Wantlist) Remove(c *cid.Cid) bool
- func (w *Wantlist) SortedEntries() []*Entry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreadSafe ¶
type ThreadSafe struct { Wantlist Wantlist // contains filtered or unexported fields }
func NewThreadSafe ¶
func NewThreadSafe() *ThreadSafe
func (*ThreadSafe) AddEntry ¶ added in v0.4.2
func (w *ThreadSafe) AddEntry(e *Entry) bool
func (*ThreadSafe) Entries ¶
func (w *ThreadSafe) Entries() []*Entry
func (*ThreadSafe) Len ¶
func (w *ThreadSafe) Len() int
func (*ThreadSafe) SortedEntries ¶
func (w *ThreadSafe) SortedEntries() []*Entry
type Wantlist ¶
type Wantlist struct {
// contains filtered or unexported fields
}
not threadsafe
func (*Wantlist) SortedEntries ¶
Click to show internal directories.
Click to hide internal directories.