api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	RetrieverForChannel(channel string) Retriever
}

Provider provides transient data retrievers

type Retriever

type Retriever interface {
	// GetTransientData gets the value for the given transient data item
	GetTransientData(ctxt context.Context, key *storeapi.Key) (*storeapi.ExpiringValue, error)

	// GetTransientDataMultipleKeys gets the values for the multiple transient data items in a single call
	GetTransientDataMultipleKeys(ctxt context.Context, key *storeapi.MultiKey) (storeapi.ExpiringValues, error)
}

Retriever retrieves transient data

type Store

type Store interface {
	// Persist stores the private write set of a transaction.
	Persist(txID string, privateSimulationResultsWithConfig *proto.TxPvtReadWriteSetWithConfigInfo) error

	// GetTransientData gets the value for the given transient data item
	GetTransientData(key *storeapi.Key) (*storeapi.ExpiringValue, error)

	// GetTransientDataMultipleKeys gets the values for the multiple transient data items in a single call
	GetTransientDataMultipleKeys(key *storeapi.MultiKey) (storeapi.ExpiringValues, error)

	// Close closes the store
	Close()
}

Store manages the storage of transient data.

type StoreProvider

type StoreProvider interface {
	// OpenStore creates a handle to the transient data store for the given ledger ID
	OpenStore(ledgerid string) (Store, error)

	// Close cleans up the provider
	Close()
}

StoreProvider is an interface to open/close a provider

Jump to

Keyboard shortcuts

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