striping

package
v0.0.0-...-4310ded Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BlockFlagEndOfDataCount uint8 = 64
	// BlockFlagSuspectErrors  uint8 = 32
	BlockFlagEndOfData uint8 = 8
)

Extended Block Header Flags

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Descriptor  uint8
	ByteCount   uint64
	OffsetCount uint64
}

The header is sent over the data channels and indicates information about the following data (if any) See https://www.ogf.org/documents/GWD-R/GFD-R.020.pdf section "Extended Block Mode"

func NewHeader

func NewHeader(byteCount, offsetCount uint64, flags ...uint8) *Header

func (*Header) AddFlag

func (header *Header) AddFlag(flags ...uint8)

func (*Header) ContainsFlag

func (header *Header) ContainsFlag(flag uint8) bool

func (*Header) GetEODCount

func (header *Header) GetEODCount() int

type Item

type Item struct {
	Segment
}

func (*Item) Less

func (item *Item) Less(b queue.Sortable) bool

type Segment

type Segment struct {
	*Header
	Data []byte
}

func NewSegment

func NewSegment(data []byte, offset int, flags ...uint8) *Segment

func NewSegmentWithHeader

func NewSegmentWithHeader(header *Header, data []byte) *Segment

func (*Segment) Less

func (a *Segment) Less(b queue.Sortable) bool

type SegmentQueue

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

func NewSegmentQueue

func NewSegmentQueue(workers int) *SegmentQueue

func (*SegmentQueue) Len

func (q *SegmentQueue) Len() int

func (*SegmentQueue) Peek

func (q *SegmentQueue) Peek() *Segment

func (*SegmentQueue) Pop

func (q *SegmentQueue) Pop() *Segment

func (*SegmentQueue) Push

func (q *SegmentQueue) Push(segment *Segment)

func (*SegmentQueue) PushChannel

func (q *SegmentQueue) PushChannel() (chan<- *Segment, <-chan *Segment)

Jump to

Keyboard shortcuts

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