runner

package
v1.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CouchDBDefaultImage = "hyperledger/fabric-couchdb:latest"
View Source
const DefaultStartTimeout = 30 * time.Second
View Source
const KafkaDefaultImage = "hyperledger/fabric-kafka:latest"
View Source
const ZooKeeperDefaultImage = "hyperledger/fabric-zookeeper:latest"

Variables

This section is empty.

Functions

This section is empty.

Types

type Configtxgen

type Configtxgen struct {
	// The location of the configtxgen executable
	Path string
	// The channel ID
	ChannelID string
	// The profile used for the channel
	Profile string
	// The organization for this config channel
	AsOrg string
	// The fabric config directory
	ConfigDir string
	// The fabric config directory set in the env variable
	EnvConfigDir string
	// The directory to write the block file
	Output string
}

Configtxgen creates runners that call cryptogen functions.

func (*Configtxgen) OutputAnchorPeersUpdate

func (c *Configtxgen) OutputAnchorPeersUpdate(extraArgs ...string) *ginkgomon.Runner

func (*Configtxgen) OutputBlock

func (c *Configtxgen) OutputBlock(extraArgs ...string) *ginkgomon.Runner

OutputBlock uses configtxgen to generate genesis block for fabric.

func (*Configtxgen) OutputCreateChannelTx

func (c *Configtxgen) OutputCreateChannelTx(extraArgs ...string) *ginkgomon.Runner

type CouchDB

type CouchDB struct {
	Client        *docker.Client
	Image         string
	HostIP        string
	HostPort      int
	ContainerPort docker.Port
	Name          string
	StartTimeout  time.Duration

	ErrorStream  io.Writer
	OutputStream io.Writer
	// contains filtered or unexported fields
}

CouchDB manages the execution of an instance of a dockerized CounchDB for tests.

func (*CouchDB) Address

func (c *CouchDB) Address() string

Address returns the address successfully used by the readiness check.

func (*CouchDB) ContainerAddress

func (c *CouchDB) ContainerAddress() string

ContainerAddress returns the container address where this CouchDB instance is available.

func (*CouchDB) ContainerID

func (c *CouchDB) ContainerID() string

ContainerID returns the container ID of this CouchDB

func (*CouchDB) HostAddress

func (c *CouchDB) HostAddress() string

HostAddress returns the host address where this CouchDB instance is available.

func (*CouchDB) Run

func (c *CouchDB) Run(sigCh <-chan os.Signal, ready chan<- struct{}) error

Run runs a CouchDB container. It implements the ifrit.Runner interface

func (*CouchDB) Start

func (c *CouchDB) Start() error

Start starts the CouchDB container using an ifrit runner

func (*CouchDB) Stop

func (c *CouchDB) Stop() error

Stop stops and removes the CouchDB container

type Cryptogen

type Cryptogen struct {
	// The location of the cryptogen executable
	Path string
	// The location of the config file
	Config string
	// The output directory
	Output string
}

Cryptogen creates runners that call cryptogen functions.

func (*Cryptogen) Generate

func (c *Cryptogen) Generate(extraArgs ...string) *ginkgomon.Runner

Generate uses cryptogen to generate cryptographic material for fabric.

type Idemixgen

type Idemixgen struct {
	// Location of the idemixgen executable
	Path string
	// Output directory
	Output string
	// Enrollment ID for the default signer
	EnrollID string
	// The organizational unit for the default signer
	OrgUnit string
	// Flag for making the default signer an admin
	IsAdmin bool
	// Handle used to revoke the default signer
	RevocationHandle int
}

Idemixgen creates runners that call idemixgen functions.

func (*Idemixgen) CAKeyGen

func (c *Idemixgen) CAKeyGen(extraArgs ...string) *ginkgomon.Runner

CAKeyGen uses idemixgen to generate CA key material for an IdeMix MSP.

func (*Idemixgen) SignerConfig

func (c *Idemixgen) SignerConfig(extraArgs ...string) *ginkgomon.Runner

SignerConfig uses idemixgen to generate a signer for an IdeMix MSP.

type Kafka

type Kafka struct {
	Client        *docker.Client
	Image         string
	HostIP        string
	HostPort      int
	ContainerPort docker.Port
	Name          string
	NetworkName   string
	StartTimeout  time.Duration

	MessageMaxBytes              int
	ReplicaFetchMaxBytes         int
	UncleanLeaderElectionEnable  bool
	DefaultReplicationFactor     int
	MinInsyncReplicas            int
	BrokerID                     int
	ZooKeeperConnect             string
	ReplicaFetchResponseMaxBytes int
	AdvertisedListeners          string
	LogLevel                     string

	ErrorStream  io.Writer
	OutputStream io.Writer

	ContainerID      string
	HostAddress      string
	ContainerAddress string
	Address          string
	// contains filtered or unexported fields
}

Kafka manages the execution of an instance of a dockerized CounchDB for tests.

func (*Kafka) Run

func (k *Kafka) Run(sigCh <-chan os.Signal, ready chan<- struct{}) error

Run runs a Kafka container. It implements the ifrit.Runner interface

func (*Kafka) Start

func (k *Kafka) Start() error

Start starts the Kafka container using an ifrit runner

func (*Kafka) Stop

func (k *Kafka) Stop() error

Stop stops and removes the Kafka container

type NameFunc

type NameFunc func() string

A NameFunc is used to generate container names.

var DefaultNamer NameFunc = helpers.UniqueName

DefaultNamer is the default naming function.

type Orderer

type Orderer struct {
	Path                        string
	ConfigDir                   string
	LedgerLocation              string
	ConfigtxOrdererKafkaBrokers string
	LogLevel                    string
}

func (*Orderer) New

func (o *Orderer) New() *ginkgomon.Runner

type Peer

type Peer struct {
	Path          string
	GoPath        string
	ExecPath      string
	ConfigDir     string
	MSPConfigPath string
	LogLevel      string
}

func (*Peer) ChaincodeListInstalled

func (p *Peer) ChaincodeListInstalled() *ginkgomon.Runner

func (*Peer) ChaincodeListInstantiated

func (p *Peer) ChaincodeListInstantiated(channel string) *ginkgomon.Runner

func (*Peer) CreateChannel

func (p *Peer) CreateChannel(channel string, filename string, orderer string) *ginkgomon.Runner

func (*Peer) FetchChannel

func (p *Peer) FetchChannel(channel string, filename string, block string, orderer string) *ginkgomon.Runner

func (*Peer) GetChannelInfo

func (p *Peer) GetChannelInfo(channel string) *ginkgomon.Runner

func (*Peer) InstallChaincode

func (p *Peer) InstallChaincode(name, version, path string)

func (*Peer) InstantiateChaincode

func (p *Peer) InstantiateChaincode(name, version, orderer, channel, args, policy string)

func (*Peer) InvokeChaincode

func (p *Peer) InvokeChaincode(name string, channel string, args string, orderer string, extraArgs ...string) *ginkgomon.Runner

func (*Peer) JoinChannel

func (p *Peer) JoinChannel(transactionFile string) *ginkgomon.Runner

func (*Peer) NodeStart

func (p *Peer) NodeStart(index int) *ginkgomon.Runner

func (*Peer) QueryChaincode

func (p *Peer) QueryChaincode(name string, channel string, args string) *ginkgomon.Runner

func (*Peer) SetLogLevel

func (p *Peer) SetLogLevel(moduleRegExp string, level string) *ginkgomon.Runner

func (*Peer) SignConfigTx

func (p *Peer) SignConfigTx(transactionFile string) *ginkgomon.Runner

func (*Peer) UpdateChannel

func (p *Peer) UpdateChannel(transactionFile string, channel string, orderer string) *ginkgomon.Runner

type ZooKeeper

type ZooKeeper struct {
	Client         *docker.Client
	Image          string
	HostIP         string
	HostPort       []int
	ContainerPorts []docker.Port
	Name           string
	StartTimeout   time.Duration

	NetworkName string
	ClientPort  docker.Port
	LeaderPort  docker.Port
	PeerPort    docker.Port
	ZooMyID     int
	ZooServers  string

	ErrorStream  io.Writer
	OutputStream io.Writer
	// contains filtered or unexported fields
}

func (*ZooKeeper) ContainerAddress

func (z *ZooKeeper) ContainerAddress() string

func (*ZooKeeper) ContainerID

func (z *ZooKeeper) ContainerID() string

func (*ZooKeeper) Run

func (z *ZooKeeper) Run(sigCh <-chan os.Signal, ready chan<- struct{}) error

func (*ZooKeeper) Start

func (z *ZooKeeper) Start() error

func (*ZooKeeper) Stop

func (z *ZooKeeper) Stop() error

Jump to

Keyboard shortcuts

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