dockercontroller

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: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSClientKeyPath      string = "/etc/mcc-github/blockchain/client.key"
	TLSClientCertPath     string = "/etc/mcc-github/blockchain/client.crt"
	TLSClientRootCertPath string = "/etc/mcc-github/blockchain/peer.crt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildMetrics

type BuildMetrics struct {
	ChaincodeImageBuildDuration metrics.Histogram
}

func NewBuildMetrics

func NewBuildMetrics(p metrics.Provider) *BuildMetrics

type ContainerInstance

type ContainerInstance struct {
	CCID     string
	Type     string
	DockerVM *DockerVM
}

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
}

func (*DockerVM) Build

func (vm *DockerVM) Build(ccid string, metadata *persistence.ChaincodePackageMetadata, codePackage io.Reader) (container.Instance, error)

func (*DockerVM) GetArgs

func (vm *DockerVM) GetArgs(ccType string, peerAddress string) ([]string, error)

func (*DockerVM) GetEnv

func (vm *DockerVM) GetEnv(ccid string, tlsConfig *ccintf.TLSConfig) []string

func (*DockerVM) GetVMName

func (vm *DockerVM) GetVMName(ccid string) string

func (*DockerVM) GetVMNameForDocker

func (vm *DockerVM) GetVMNameForDocker(ccid string) (string, error)

func (*DockerVM) HealthCheck

func (vm *DockerVM) HealthCheck(ctx context.Context) error

func (*DockerVM) Start

func (vm *DockerVM) Start(ccid string, ccType string, peerConnection *ccintf.PeerConnection) error

func (*DockerVM) Stop

func (vm *DockerVM) Stop(ccid string) error

func (*DockerVM) Wait

func (vm *DockerVM) Wait(ccid string) (int, error)

type PlatformBuilder

type PlatformBuilder interface {
	GenerateDockerBuild(ccType, path string, codePackage io.Reader) (io.Reader, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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