Documentation ¶
Index ¶
- Constants
- type BuildMetrics
- type ContainerInstance
- type DockerVM
- func (vm *DockerVM) Build(ccid string, metadata *persistence.ChaincodePackageMetadata, ...) (container.Instance, error)
- func (vm *DockerVM) GetArgs(ccType string, peerAddress string) ([]string, error)
- func (vm *DockerVM) GetEnv(ccid string, tlsConfig *ccintf.TLSConfig) []string
- func (vm *DockerVM) GetVMName(ccid string) string
- func (vm *DockerVM) GetVMNameForDocker(ccid string) (string, error)
- func (vm *DockerVM) HealthCheck(ctx context.Context) error
- func (vm *DockerVM) Start(ccid string, ccType string, peerConnection *ccintf.PeerConnection) error
- func (vm *DockerVM) Stop(ccid string) error
- func (vm *DockerVM) Wait(ccid string) (int, error)
- type PlatformBuilder
Constants ¶
const ( // Mutual TLS auth client key and cert paths in the chaincode container TLSClientKeyPath string = "/etc/hyperledger/fabric/client.key" TLSClientCertPath string = "/etc/hyperledger/fabric/client.crt" TLSClientKeyFile string = "/etc/hyperledger/fabric/client_pem.key" TLSClientCertFile string = "/etc/hyperledger/fabric/client_pem.crt" TLSClientRootCertFile string = "/etc/hyperledger/fabric/peer.crt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildMetrics ¶ added in v1.4.0
func NewBuildMetrics ¶ added in v1.4.0
func NewBuildMetrics(p metrics.Provider) *BuildMetrics
type ContainerInstance ¶
func (*ContainerInstance) ChaincodeServerInfo ¶
func (ci *ContainerInstance) ChaincodeServerInfo() (*ccintf.ChaincodeServerInfo, error)
func (*ContainerInstance) Start ¶
func (ci *ContainerInstance) Start(peerConnection *ccintf.PeerConnection) error
func (*ContainerInstance) Stop ¶
func (ci *ContainerInstance) Stop() error
func (*ContainerInstance) Wait ¶
func (ci *ContainerInstance) Wait() (int, error)
type DockerVM ¶
type DockerVM struct { PeerID string NetworkID string BuildMetrics *BuildMetrics HostConfig *docker.HostConfig Client dockerClient AttachStdOut bool ChaincodePull bool NetworkMode string PlatformBuilder PlatformBuilder LoggingEnv []string MSPID string }
DockerVM is a vm. It is identified by an image id
func (*DockerVM) Build ¶
func (vm *DockerVM) Build(ccid string, metadata *persistence.ChaincodePackageMetadata, codePackage io.Reader) (container.Instance, error)
Build is responsible for building an image if it does not already exist.
func (*DockerVM) GetVMName ¶
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) GetVMNameForDocker ¶ added in v1.2.0
GetVMNameForDocker 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.
func (*DockerVM) HealthCheck ¶ added in v1.4.0
HealthCheck checks if the DockerVM is able to communicate with the Docker daemon.