container

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildReq

type BuildReq struct {
	CCID        ccintf.CCID
	Type        string
	Path        string
	Name        string
	Version     string
	CodePackage []byte
}

func (BuildReq) Do

func (b BuildReq) Do(v VM) error

func (BuildReq) GetCCID

func (w BuildReq) GetCCID() ccintf.CCID

type Builder

type Builder interface {
	Build() (io.Reader, error)
}

type ChaincodeBuilder

type ChaincodeBuilder interface {
	Build(ccid ccintf.CCID, ccType, path, name, version string, codePackage []byte) error
}

type ExitedFunc

type ExitedFunc func(exitCode int, err error)

type Instance

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

type PackageProvider

type PackageProvider interface {
	GetChaincodePackage(packageID string) (*persistence.ChaincodePackageMetadata, io.ReadCloser, error)
}

type Router

type Router struct {
	ExternalVM VM
	DockerVM   VM

	PackageProvider PackageProvider
	// contains filtered or unexported fields
}

func (*Router) Build

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

func (*Router) Start

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

func (*Router) Stop

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

func (*Router) Wait

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

type StartContainerReq

type StartContainerReq struct {
	ccintf.CCID
	Args          []string
	Env           []string
	FilesToUpload map[string][]byte
}

func (StartContainerReq) Do

func (si StartContainerReq) Do(v VM) error

func (StartContainerReq) GetCCID

func (si StartContainerReq) GetCCID() ccintf.CCID

type StopContainerReq

type StopContainerReq struct {
	ccintf.CCID
	Timeout uint

	Dontkill bool

	Dontremove bool
}

func (StopContainerReq) Do

func (si StopContainerReq) Do(v VM) error

func (StopContainerReq) GetCCID

func (si StopContainerReq) GetCCID() ccintf.CCID

type UninitializedInstance

type UninitializedInstance struct{}

func (UninitializedInstance) Start

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

func (UninitializedInstance) Stop

func (UninitializedInstance) Wait

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

type VM

type VM interface {
	Start(ccid ccintf.CCID, args []string, env []string, filesToUpload map[string][]byte) error
	Stop(ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error
	Wait(ccid ccintf.CCID) (int, error)
}

type VMCReq

type VMCReq interface {
	Do(v VM) error
	GetCCID() ccintf.CCID
}

type VMController

type VMController struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewVMController

func NewVMController(vmProviders map[string]VMProvider) *VMController

func (*VMController) Process

func (vmc *VMController) Process(vmtype string, req VMCReq) error

type VMProvider

type VMProvider interface {
	NewVM() VM
}

type WaitContainerReq

type WaitContainerReq struct {
	CCID   ccintf.CCID
	Exited ExitedFunc
}

func (WaitContainerReq) Do

func (w WaitContainerReq) Do(v VM) error

func (WaitContainerReq) GetCCID

func (w WaitContainerReq) GetCCID() ccintf.CCID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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