storage

package
v0.0.0-...-7638244 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(objs ...interface{}) error

Close attempts to close one or multiple storages

Types

type Appender

type Appender interface {
	Append(key key.Key, value []byte, ttl time.Duration) error
}

Appender represents a contract that allows appending to a storage.

type Iterator

type Iterator interface {
	Range(seek, until key.Key, f func(key, value []byte) bool) error
}

Iterator represents a contract that allows iterating over a storage.

type Merger

type Merger interface {
	Merge([]block.Block, typeof.Schema) ([]byte, []byte)
}

Merger represents a contract that merges two or more blocks together.

type Storage

type Storage interface {
	io.Closer
	Iterator
	Appender
	Delete(...key.Key) error
}

Storage represents a contract that supports both iteration and append.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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