buffers

package
v0.0.0-...-d1f57cd Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block[T BlockType] struct {
	Timestamp *Timestamp
	Data      []T
	Size      int
	Pos       int
}

func NewBlock

func NewBlock[T BlockType](size int) *Block[T]

func (*Block[T]) CopyTimestamp

func (b *Block[T]) CopyTimestamp(ts *Timestamp) *Timestamp

func (*Block[T]) End

func (b *Block[T]) End() bool

func (*Block[T]) Less

func (b *Block[T]) Less(other *Block[T]) bool

func (*Block[T]) Remainder

func (b *Block[T]) Remainder() int

func (*Block[T]) Reset

func (b *Block[T]) Reset()

func (*Block[T]) String

func (b *Block[T]) String() string

func (*Block[T]) Write

func (b *Block[T]) Write(source *Block[T], ts *Timestamp) int

func (*Block[T]) WriteRaw

func (b *Block[T]) WriteRaw(data []T, ts *Timestamp)

type BlockHandler

type BlockHandler[T BlockType] func(block *Block[T])

type BlockRing

type BlockRing[T BlockType] struct {
	Size  int
	Count int
	// contains filtered or unexported fields
}

func NewBlockRing

func NewBlockRing[T BlockType](size, count int) *BlockRing[T]

func (*BlockRing[T]) Copy

func (r *BlockRing[T]) Copy(destination []*Block[T])

func (*BlockRing[T]) Next

func (r *BlockRing[T]) Next() *Block[T]

type BlockType

type BlockType interface {
	byte | complex64 | complex128 | float32 | float64 | uint16 | uint32 | uint64 | uint | int8 | int16 | int32 | int64 | int | bool
}

type Stream

type Stream[T BlockType] struct {
	Count int
	Size  int
	// contains filtered or unexported fields
}

func NewStream

func NewStream[T BlockType](size int, count int) *Stream[T]

func (*Stream[T]) Clone

func (s *Stream[T]) Clone() *Stream[T]

func (*Stream[T]) Close

func (s *Stream[T]) Close()

func (*Stream[T]) Done

func (s *Stream[T]) Done()

func (*Stream[T]) Next

func (s *Stream[T]) Next() *Block[T]

func (*Stream[T]) Receive

func (s *Stream[T]) Receive(handler BlockHandler[T]) (closed bool)

func (*Stream[T]) Send

func (s *Stream[T]) Send(data *Block[T])

type Timestamp

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

func NewTimestamp

func NewTimestamp() *Timestamp

func TimestampFromString

func TimestampFromString(str string) (*Timestamp, error)

func (*Timestamp) Child

func (ts *Timestamp) Child() *Timestamp

func (*Timestamp) Clone

func (ts *Timestamp) Clone() *Timestamp

func (*Timestamp) Copy

func (ts *Timestamp) Copy(destination *Timestamp)

func (*Timestamp) Increment

func (ts *Timestamp) Increment()

func (*Timestamp) Less

func (ts *Timestamp) Less(other *Timestamp) bool

func (*Timestamp) Reset

func (ts *Timestamp) Reset()

func (*Timestamp) Set

func (ts *Timestamp) Set(value uint64)

func (*Timestamp) String

func (ts *Timestamp) String() string

type Timestamps

type Timestamps []*Timestamp

func (Timestamps) Len

func (ts Timestamps) Len() int

func (Timestamps) Less

func (ts Timestamps) Less(i, j int) bool

func (Timestamps) Swap

func (ts Timestamps) Swap(i, j int)

Jump to

Keyboard shortcuts

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