fabric: github.com/hyperledger/fabric/core/container/inproccontroller Index | Files

package inproccontroller

import "github.com/hyperledger/fabric/core/container/inproccontroller"


Package Files

inproccontroller.go inprocstream.go


const ContainerType = "SYSTEM"

ContainerType is the string which the inproc container type is registered with the container.VMController

type InprocVM Uses

type InprocVM struct {
    // contains filtered or unexported fields

InprocVM is a vm. It is identified by a executable name

func NewInprocVM Uses

func NewInprocVM(r *Registry) *InprocVM

NewInprocVM creates a new InprocVM

func (*InprocVM) GetVMName Uses

func (vm *InprocVM) GetVMName(ccid ccintf.CCID) string

GetVMName ignores the peer and network name as it just needs to be unique in process. It accepts a format function parameter to allow different formatting based on the desired use of the name.

func (*InprocVM) HealthCheck Uses

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

HealthCheck is provided in order to implement the VMProvider interface. It always returns nil..

func (*InprocVM) Start Uses

func (vm *InprocVM) Start(ccid ccintf.CCID, args []string, env []string, filesToUpload map[string][]byte, builder container.Builder) error

Start starts a previously registered system codechain

func (*InprocVM) Stop Uses

func (vm *InprocVM) Stop(ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error

Stop stops a system codechain

func (*InprocVM) Wait Uses

func (vm *InprocVM) Wait(ccid ccintf.CCID) (int, error)

Wait will block until the chaincode is stopped.

type Registry Uses

type Registry struct {
    ChaincodeSupport ccintf.CCSupport
    // contains filtered or unexported fields

Registry stores registered system chaincodes. It implements container.VMProvider and scc.Registrar

func NewRegistry Uses

func NewRegistry() *Registry

NewRegistry creates an initialized registry, ready to register system chaincodes. The returned *Registry is _not_ ready to use as is. You must set the ChaincodeSupport as soon as one is available, before any chaincode invocations occur. This is because the chaincode support used to be a latent dependency, snuck in on the context, but now it is being made an explicit part of the startup.

func (*Registry) NewVM Uses

func (r *Registry) NewVM() container.VM

NewVM creates an inproc VM instance

func (*Registry) Register Uses

func (r *Registry) Register(ccid *ccintf.CCID, cc shim.Chaincode) error

Register registers system chaincode with given path. The deploy should be called to initialize

type SendPanicFailure Uses

type SendPanicFailure string


func (SendPanicFailure) Error Uses

func (e SendPanicFailure) Error() string

type SysCCRegisteredErr Uses

type SysCCRegisteredErr string

SysCCRegisteredErr registered error

func (SysCCRegisteredErr) Error Uses

func (s SysCCRegisteredErr) Error() string

Package inproccontroller imports 9 packages (graph) and is imported by 50 packages. Updated 2019-02-26. Refresh now. Tools for package owners.