memory

package
v0.0.0-...-f1c747c Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package memory provides a simple in-process implementation of the tree- and log-storage interfaces.

This implementation is intended SOLELY for use in integration tests which exercise properties of the higher levels of Trillian componened - e.g. an integration test which ensures that the Trillian Log is able to correctly handle a tree which contains duplicate leaves.

The storage implementation is based on a BTree, which provides an ordered key-value space which can be used to store arbitrary items, as well as scan ranges of keys in order.

The implementation does provide transaction-like semantics for the LogStorage interface, although conflict is avoided by each writable transaction exclusively locking the tree until it's committed or rolled-back.

Currently, the Admin Storage does not honor transactional semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(t *btree.BTree)

Dump ascends the tree, logging the items contained.

func NewAdminStorage

func NewAdminStorage(ms storage.LogStorage) storage.AdminStorage

NewAdminStorage returns a storage.AdminStorage implementation backed by memoryTreeStorage.

func NewLogStorage

func NewLogStorage() storage.LogStorage

NewLogStorage creates an in-memory LogStorage instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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