storage

package
v0.0.0-...-6a9e591 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchCommittedResult

type BatchCommittedResult struct {
	TransactionContexts []*transaction.Context
	BatchNum            int64
	BatchMetadata       []byte
	WrittenSignal       chan struct{}
	SyncedSignal        chan struct{}
}

type MemStorage

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

func (*MemStorage) GetState

func (ms *MemStorage) GetState(ns, key string) ([]byte, error)

func (*MemStorage) Write

func (ms *MemStorage) Write(batchCommittedResult *BatchCommittedResult)

type Storage

type Storage interface {
	// GetState reads a value for a specific key. The value may be read from cache
	// and not persistent yet.
	GetState(ns, key string) ([]byte, error)

	// Write writes the transaction batch and updated state to underlying storage.
	Write(batchCommittedResult *BatchCommittedResult)
}

Jump to

Keyboard shortcuts

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