dockercontroller

package
v0.0.0-...-d35ede9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerVM

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

DockerVM is a vm. It is identified by an image id

func NewDockerVM

func NewDockerVM() *DockerVM

NewDockerVM returns a new DockerVM instance

func (*DockerVM) Deploy

func (vm *DockerVM) Deploy(ctxt context.Context, ccid ccintf.CCID,
	args []string, env []string, reader io.Reader) error

Deploy use the reader containing targz to create a docker image for docker inputbuf is tar reader ready for use by docker.Client the stream from end client to peer could directly be this tar stream talk to docker daemon using docker Client and build the image

func (*DockerVM) Destroy

func (vm *DockerVM) Destroy(ctxt context.Context, ccid ccintf.CCID, force bool, noprune bool) error

Destroy destroys an image

func (*DockerVM) GetVMName

func (vm *DockerVM) GetVMName(ccid ccintf.CCID, format func(string) (string, error)) (string, error)

GetVMName generates the VM name from peer information. It accepts a format function parameter to allow different formatting based on the desired use of the name.

func (*DockerVM) Start

func (vm *DockerVM) Start(ctxt context.Context, ccid ccintf.CCID,
	args []string, env []string, builder container.BuildSpecFactory, prelaunchFunc container.PrelaunchFunc) error

Start starts a container using a previously created docker image

func (*DockerVM) Stop

func (vm *DockerVM) Stop(ctxt context.Context, ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error

Stop stops a running chaincode

Jump to

Keyboard shortcuts

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