ucc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chaincodes

func Chaincodes() []api.UserCC

Chaincodes returns all registered in-process chaincodes

func Get

func Get(ccID string) (api.UserCC, bool)

Get returns the in-process chaincode for the given ID

func Register

func Register(ccCreator interface{})

Register registers an in-process user chaincode creator function. The user chaincode will be initialized during peer startup with all of its declared dependencies.

func WaitForReady

func WaitForReady()

WaitForReady blocks until the chaincodes are all registered

Types

type Registry

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

Registry maintains a registry of in-process user chaincode

func (*Registry) Chaincodes

func (r *Registry) Chaincodes() []api.UserCC

Chaincodes returns all registered in-process chaincodes

func (*Registry) ChannelJoined

func (r *Registry) ChannelJoined(channelID string)

ChannelJoined is called when the peer joins a channel

func (*Registry) Get

func (r *Registry) Get(ccID string) (api.UserCC, bool)

Get returns the in-process chaincode for the given ID

func (*Registry) Initialize

func (r *Registry) Initialize() *Registry

Initialize is called on peer startup

func (*Registry) WaitForReady

func (r *Registry) WaitForReady()

WaitForReady blocks until the chaincodes are all registered

Jump to

Keyboard shortcuts

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