block

package
v0.0.0-...-a9872fa Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2014 License: GPL-3.0 Imports: 5 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 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(capacity int) *Block

Creates a new Block instance Capacity is the initial array capacity

func (*Block) Append

func (r *Block) Append(value interface{}) uint

func (*Block) GobDecode

func (r *Block) GobDecode(buf []byte) error

Decodes the byte array in GOB format to the Block

func (*Block) GobEncode

func (r *Block) GobEncode() ([]byte, error)

Encodes the Block in GOB format to a byte array

func (*Block) Iterate

func (r *Block) Iterate(f IteratorFn)

iterates each row in the RleList

func (*Block) Read

func (r *Block) Read(reader io.Reader) error

reads the RleList from a Reader, overwriting the current contents if an error occurs the RleList will be initialised to empty

func (*Block) Write

func (r *Block) Write(writer io.Writer) error

writes the rleList to a writer

type IteratorFn

type IteratorFn func(index uint, value interface{})

iterator function type delaration

Jump to

Keyboard shortcuts

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