memoryengine

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine added in v0.7.0

type Engine struct {
	Closed bool
	// contains filtered or unexported fields
}

Engine is a simple memory engine implementation that stores data in an in-memory Btree. It is not thread safe.

func NewEngine

func NewEngine() *Engine

NewEngine creates an in-memory engine.

func (*Engine) Begin added in v0.7.0

func (ng *Engine) Begin(ctx context.Context, opts engine.TxOptions) (engine.Transaction, error)

Begin creates a transaction.

func (*Engine) Close added in v0.7.0

func (ng *Engine) Close() error

Close the engine.

func (*Engine) Drop added in v0.14.0

func (ng *Engine) Drop(ctx context.Context) error

func (*Engine) NewTransientEngine added in v0.14.0

func (ng *Engine) NewTransientEngine(ctx context.Context) (engine.Engine, error)

Jump to

Keyboard shortcuts

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