{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package dockercontroller\n\n## Constants\n\n```go\nconst ContainerType = \"DOCKER\"\n```\nContainerType is the string which the docker container type is registered with the container.VMController\n\n## Types\n\n```go\ntype BuildMetrics struct {\n\tChaincodeImageBuildDuration metrics.Histogram\n}\n```\n\n```go\nfunc NewBuildMetrics(p metrics.Provider) *BuildMetrics\n```\n\n```go\ntype DockerVM struct {\n\tPeerID       string\n\tNetworkID    string\n\tBuildMetrics *BuildMetrics\n\t// contains filtered or unexported fields\n}\n```\nDockerVM is a vm. It is identified by an image id\n\n```go\nfunc NewDockerVM(peerID, networkID string, buildMetrics *BuildMetrics) *DockerVM\n```\nNewDockerVM returns a new DockerVM instance\n\n```go\nfunc (vm *DockerVM) GetVMName(ccid ccintf.CCID) string\n```\nGetVMName 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.\n\n```go\nfunc (vm *DockerVM) GetVMNameForDocker(ccid ccintf.CCID) (string, error)\n```\nGetVMNameForDocker formats the docker image from peer information. This is needed to keep image (repository) names unique in a single host, multi-peer environment (such as a development environment). It computes the hash for the supplied image name and then appends it to the lowercase image name to ensure uniqueness.\n\n```go\nfunc (vm *DockerVM) HealthCheck(ctx context.Context) error\n```\nHealthCheck checks if the DockerVM is able to communicate with the Docker daemon.\n\n```go\nfunc (vm *DockerVM) Start(ccid ccintf.CCID, args, env []string, filesToUpload map[string][]byte, builder container.Builder) error\n```\nStart starts a container using a previously created docker image\n\n```go\nfunc (vm *DockerVM) Stop(ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error\n```\nStop stops a running chaincode\n\n```go\nfunc (vm *DockerVM) Wait(ccid ccintf.CCID) (int, error)\n```\nWait blocks until the container stops and returns the exit code of the container.\n\n```go\ntype Provider struct {\n\tPeerID       string\n\tNetworkID    string\n\tBuildMetrics *BuildMetrics\n}\n```\nProvider implements container.VMProvider\n\n```go\nfunc NewProvider(peerID, networkID string, metricsProvider metrics.Provider) *Provider\n```\nNewProvider creates a new instance of Provider\n\n```go\nfunc (p *Provider) NewVM() container.VM\n```\nNewVM creates a new DockerVM instance\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/container/dockercontroller","name":"dockercontroller","synopsis":"","isRedistributable":true}
