semantics

package
v0.0.0-...-cd2353e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MaxTxnWrites uint64 = 10 // 10 is completely arbitrary

MaxTxnWrites is a guaranteed reservation for each transaction.

Variables

This section is empty.

Functions

func CheckFalse

func CheckFalse(b *BoolTest) bool

func CheckTrue

func CheckTrue(b *BoolTest) bool

func IterateMapKeys

func IterateMapKeys(m map[uint64]uint64) uint64

func IterateMapValues

func IterateMapValues(m map[uint64]uint64) uint64

Types

type AdderType

type AdderType = func(uint64) uint64

type ArrayEditor

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

helpers

func (*ArrayEditor) Advance

func (ae *ArrayEditor) Advance(arr []uint64, next uint64)

type Bar

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

type BoolTest

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

helpers

type Dec

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

type Editor

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

helpers

func (*Editor) AdvanceReturn

func (e *Editor) AdvanceReturn(next uint64) uint64

advances the array editor, and returns the value it wrote, storing "next" in next_val

type Enc

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

helpers

type Foo

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

Foo contains a nested struct which is intended to be manipulated through a Foo pointer

type Log

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

func New

func New() Log

New initializes a fresh log

func Open

func Open() Log

Open recovers the log following a crash or shutdown

func (Log) Apply

func (l Log) Apply()

Apply all the committed transactions.

Frees all the space in the log.

func (Log) BeginTxn

func (l Log) BeginTxn() bool

BeginTxn allocates space for a new transaction in the log.

Returns true if the allocation succeeded.

func (Log) Commit

func (l Log) Commit()

Commit the current transaction.

func (Log) Read

func (l Log) Read(a uint64) disk.Block

Read from the logical disk.

Reads must go through the log to return committed but un-applied writes.

func (Log) Size

func (l Log) Size() uint64

func (Log) Write

func (l Log) Write(a uint64, v disk.Block)

Write to the disk through the log.

type LoopStruct

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

based off diskAppendWait loop pattern in logging2

type MultipleArgsType

type MultipleArgsType = func(uint64, bool) uint64

type Pair

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

type S

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

func NewS

func NewS() *S

type SquareStruct

type SquareStruct struct {
	Side uint64
}

func (SquareStruct) Square

func (t SquareStruct) Square() uint64

func (SquareStruct) Volume

func (t SquareStruct) Volume() uint64

type StructWrap

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

type TwoInts

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

type Uint32

type Uint32 uint32

Jump to

Keyboard shortcuts

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