wantlist

package
v0.0.0-...-2963f48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	// TODO consider making entries immutable so they can be shared safely and
	// slices can be copied efficiently.
	Key      u.Key
	Priority int
}

type ThreadSafe

type ThreadSafe struct {
	Wantlist
	// contains filtered or unexported fields
}

func NewThreadSafe

func NewThreadSafe() *ThreadSafe

func (*ThreadSafe) Add

func (w *ThreadSafe) Add(k u.Key, priority int)

func (*ThreadSafe) Contains

func (w *ThreadSafe) Contains(k u.Key) bool

func (*ThreadSafe) Entries

func (w *ThreadSafe) Entries() []Entry

func (*ThreadSafe) Remove

func (w *ThreadSafe) Remove(k u.Key)

func (*ThreadSafe) SortedEntries

func (w *ThreadSafe) SortedEntries() []Entry

type Wantlist

type Wantlist struct {
	// contains filtered or unexported fields
}

not threadsafe

func New

func New() *Wantlist

func (*Wantlist) Add

func (w *Wantlist) Add(k u.Key, priority int)

func (*Wantlist) Contains

func (w *Wantlist) Contains(k u.Key) bool

func (*Wantlist) Entries

func (w *Wantlist) Entries() []Entry

func (*Wantlist) Remove

func (w *Wantlist) Remove(k u.Key)

func (*Wantlist) SortedEntries

func (w *Wantlist) SortedEntries() []Entry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL