dockercontroller

package
v0.0.0-...-f2e3eef Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 10 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 (*DockerVM) Deploy

func (vm *DockerVM) Deploy(ctxt context.Context, ccid ccintf.CCID, args []string, env []string, attachstdin bool, attachstdout bool, 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) (string, error)

GetVMName generates the docker image from peer information given the hashcode. This is needed to keep image name's unique in a single host, multi-peer environment (such as a development environment)

func (*DockerVM) Start

func (vm *DockerVM) Start(ctxt context.Context, ccid ccintf.CCID, args []string, env []string, attachstdin bool, attachstdout bool, reader io.Reader) 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