Documentation ¶
Index ¶
- Variables
- func NewProvider() (ledger.PeerLedgerProvider, error)
- type Provider
- func (provider *Provider) Close()
- func (provider *Provider) Create(ledgerID string) (ledger.PeerLedger, error)
- func (provider *Provider) Exists(ledgerID string) (bool, error)
- func (provider *Provider) List() ([]string, error)
- func (provider *Provider) Open(ledgerID string) (ledger.PeerLedger, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrLedgerIDExists is thrown by a CreateLedger call if a ledger with the given id already exists ErrLedgerIDExists = errors.New("LedgerID already exists") // ErrNonExistingLedgerID is thrown by a OpenLedger call if a ledger with the given id does not exist ErrNonExistingLedgerID = errors.New("LedgerID does not exist") // ErrLedgerNotOpened is thrown by a CloseLedger call if a ledger with the given id has not been opened ErrLedgerNotOpened = errors.New("Ledger is not opened yet") )
Functions ¶
func NewProvider ¶
func NewProvider() (ledger.PeerLedgerProvider, error)
NewProvider instantiates a new Provider. This is not thread-safe and assumed to be synchronized be the caller
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements interface ledger.PeerLedgerProvider
func (*Provider) Close ¶
func (provider *Provider) Close()
Close implements the corresponding method from interface ledger.PeerLedgerProvider
func (*Provider) Create ¶
func (provider *Provider) Create(ledgerID string) (ledger.PeerLedger, error)
Create implements the corresponding method from interface ledger.PeerLedgerProvider
func (*Provider) Exists ¶
Exists implements the corresponding method from interface ledger.PeerLedgerProvider
func (*Provider) List ¶
List implements the corresponding method from interface ledger.PeerLedgerProvider
Click to show internal directories.
Click to hide internal directories.