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: 4 Imported by: 0

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 data retrievers

type Retriever

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

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

	// Query returns the results from the given query
	// NOTE: This function is only supported on CouchDB
	Query(ctxt context.Context, key *storeapi.QueryKey) (storeapi.ResultsIterator, error)
}

Retriever retrieves data

type Store

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

	// PutData stores the key/value.
	PutData(config *pb.StaticCollectionConfig, key *storeapi.Key, value *storeapi.ExpiringValue) error

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

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

	// Query executes the given query
	// NOTE: This function is only supported on CouchDB
	Query(key *storeapi.QueryKey) (storeapi.ResultsIterator, error)

	// Close closes the store
	Close()
}

Store manages the storage of private data collections.

type StoreProvider

type StoreProvider interface {
	// OpenStore creates a handle to the private 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 store

Jump to

Keyboard shortcuts

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