queues

package
v0.0.0-...-b785d8d Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2015 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

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

func NewAllocator

func NewAllocator(capacity uint64) *Allocator

func (*Allocator) Alloc

func (self *Allocator) Alloc(a uint64) uint64

func (*Allocator) Free

func (self *Allocator) Free(a uint64)

func (*Allocator) Request

func (self *Allocator) Request(a uint64) uint64

type Puller

type Puller interface {
	Pull(budget Matrix) Matrix
}

type Queue

type Queue struct {
	BackPressure bool

	Allocator *Allocator
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue() *Queue

func NewSizedQueue

func NewSizedQueue(capacity uint64) *Queue

func (*Queue) Pull

func (self *Queue) Pull(size uint64, next Block, loc, dropBy int) uint64

func (*Queue) Push

func (self *Queue) Push(packet *Packet)

func (*Queue) Send

func (self *Queue) Send(packet *Packet) uint64

func (*Queue) Size

func (self *Queue) Size() uint64

type Queues

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

func NewNicQueues

func NewNicQueues(capacity, totalCap uint64) *Queues

func NewQueues

func NewQueues() *Queues

func NewSizedQueues

func NewSizedQueues(capacity uint64) *Queues

func (*Queues) Clear

func (self *Queues) Clear()

func (*Queues) Cut

func (self *Queues) Cut(size Matrix, next Block,
	loc, dropBy int, ret Matrix)

func (*Queues) CutToCapacity

func (self *Queues) CutToCapacity(next Block, dropBy int, ret Matrix)

func (*Queues) Drop

func (self *Queues) Drop(size Matrix, next Block, dropBy int, ret Matrix)

func (*Queues) DropAll

func (self *Queues) DropAll(next Block, dropBy int, ret Matrix)

func (*Queues) Len

func (self *Queues) Len() Matrix

func (*Queues) LenTo

func (self *Queues) LenTo(ret Matrix)

func (*Queues) Move

func (self *Queues) Move(size Matrix, next Block, loc int, ret Matrix)

func (*Queues) MoveAll

func (self *Queues) MoveAll(next Block, loc int, ret Matrix)

func (*Queues) MoveUsing

func (self *Queues) MoveUsing(next Block, loc int,
	puller Puller) (buf Matrix, pulled Matrix)

func (*Queues) Push

func (self *Queues) Push(packet *Packet)

func (*Queues) Send

func (self *Queues) Send(packet *Packet) uint64

Jump to

Keyboard shortcuts

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