externalbuilders

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

Documentation

Index

Constants

View Source
const MetadataFile = "metadata.json"

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(name string, args ...string) *exec.Cmd

func RunCommand

func RunCommand(logger *flogging.FabricLogger, cmd *exec.Cmd) error

func Untar

func Untar(buffer io.Reader, dst string) error

func ValidPath

func ValidPath(uncleanPath string) bool

Types

type BuildContext

type BuildContext struct {
	CCID        string
	Metadata    *persistence.ChaincodePackageMetadata
	ScratchDir  string
	SourceDir   string
	MetadataDir string
	OutputDir   string
	LaunchDir   string
}

func NewBuildContext

func NewBuildContext(ccid string, md *persistence.ChaincodePackageMetadata, codePackage io.Reader) (*BuildContext, error)

func (*BuildContext) Cleanup

func (bc *BuildContext) Cleanup()

type Builder

type Builder struct {
	Location string
	Logger   *flogging.FabricLogger
}

func (*Builder) Build

func (b *Builder) Build(buildContext *BuildContext) error

func (*Builder) Detect

func (b *Builder) Detect(buildContext *BuildContext) bool

func (*Builder) Launch

func (b *Builder) Launch(buildContext *BuildContext, peerConnection *ccintf.PeerConnection) error

func (*Builder) Name

func (b *Builder) Name() string

type Detector

type Detector struct {
	Builders []string
}

func (*Detector) Build

func (d *Detector) Build(ccid string, md *persistence.ChaincodePackageMetadata, codeStream io.Reader) (*Instance, error)

func (*Detector) Detect

func (d *Detector) Detect(buildContext *BuildContext) *Builder

type Instance

type Instance struct {
	BuildContext *BuildContext
	Builder      *Builder
}

func (*Instance) Start

func (i *Instance) Start(peerConnection *ccintf.PeerConnection) error

func (*Instance) Stop

func (i *Instance) Stop() error

func (*Instance) Wait

func (i *Instance) Wait() (int, error)

type LaunchConfig

type LaunchConfig struct {
	PeerAddress string `json:"peer_address"`
	ClientCert  []byte `json:"client_cert"`
	ClientKey   []byte `json:"client_key"`
	RootCert    []byte `json:"root_cert"`
}

Jump to

Keyboard shortcuts

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