container

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRegistry added in v1.5.6

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

func (*BuildRegistry) BuildStatus added in v1.5.6

func (br *BuildRegistry) BuildStatus(ccid string) (*BuildStatus, bool)

BuildStatus returns a BuildStatus for the ccid, and whether the caller is waiting in line (true), or this build status is new and their responsibility. If the build status is new, then the caller must call Notify with the error (or nil) upon completion.

func (*BuildRegistry) ResetBuildStatus added in v1.5.6

func (br *BuildRegistry) ResetBuildStatus(ccid string) *BuildStatus

ResetBuildStatus returns a new BuildStatus for the ccid. This build status is new and the caller's responsibility. The caller must use external locking to ensure the build status is not reset by another install request and must call Notify with the error (or nil) upon completion.

type BuildStatus added in v1.5.6

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

func NewBuildStatus added in v1.5.6

func NewBuildStatus() *BuildStatus

func (*BuildStatus) Done added in v1.5.6

func (bs *BuildStatus) Done() <-chan struct{}

func (*BuildStatus) Err added in v1.5.6

func (bs *BuildStatus) Err() error

func (*BuildStatus) Notify added in v1.5.6

func (bs *BuildStatus) Notify(err error)

type DockerBuilder added in v1.5.6

type DockerBuilder interface {
	Build(ccid string, metadata *persistence.ChaincodePackageMetadata, codePackageStream io.Reader) (Instance, error)
}

DockerBuilder is what is exposed by the dockercontroller

type ExternalBuilder added in v1.5.6

type ExternalBuilder interface {
	Build(ccid string, metadata []byte, codePackageStream io.Reader) (Instance, error)
}

ExternalBuilder is what is exposed by the dockercontroller

type Instance added in v1.5.6

type Instance interface {
	Start(peerConnection *ccintf.PeerConnection) error
	ChaincodeServerInfo() (*ccintf.ChaincodeServerInfo, error)
	Stop() error
	Wait() (int, error)
}

Instance represents a built chaincode instance, because of the docker legacy, calling this a built 'container' would be very misleading, and going forward with the external launcher 'image' also seemed inappropriate. So, the vague 'Instance' is used here.

type PackageProvider added in v1.5.6

type PackageProvider interface {
	GetChaincodePackage(packageID string) (md *persistence.ChaincodePackageMetadata, mdBytes []byte, codeStream io.ReadCloser, err error)
}

PackageProvider gets chaincode packages from the filesystem.

type Router added in v1.5.6

type Router struct {
	ExternalBuilder ExternalBuilder
	DockerBuilder   DockerBuilder

	PackageProvider PackageProvider
	// contains filtered or unexported fields
}

func (*Router) Build added in v1.5.6

func (r *Router) Build(ccid string) error

func (*Router) ChaincodeServerInfo added in v1.5.6

func (r *Router) ChaincodeServerInfo(ccid string) (*ccintf.ChaincodeServerInfo, error)

func (*Router) Shutdown added in v1.5.6

func (r *Router) Shutdown(timeout time.Duration)

func (*Router) Start added in v1.5.6

func (r *Router) Start(ccid string, peerConnection *ccintf.PeerConnection) error

func (*Router) Stop added in v1.5.6

func (r *Router) Stop(ccid string) error

func (*Router) Wait added in v1.5.6

func (r *Router) Wait(ccid string) (int, error)

type UninitializedInstance added in v1.5.6

type UninitializedInstance struct{}

func (UninitializedInstance) ChaincodeServerInfo added in v1.5.6

func (UninitializedInstance) ChaincodeServerInfo() (*ccintf.ChaincodeServerInfo, error)

func (UninitializedInstance) Start added in v1.5.6

func (UninitializedInstance) Start(peerConnection *ccintf.PeerConnection) error

func (UninitializedInstance) Stop added in v1.5.6

func (UninitializedInstance) Wait added in v1.5.6

func (UninitializedInstance) Wait() (int, error)

Directories

Path Synopsis
mock
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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