runner

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 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 added in v1.2.0

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 added in v1.2.0

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

func (*Configtxgen) OutputBlock added in v1.2.0

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

OutputBlock uses configtxgen to generate genesis block for fabric.

func (*Configtxgen) OutputCreateChannelTx added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

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

Generate uses cryptogen to generate cryptographic material for fabric.

type Idemixgen added in v1.2.0

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 added in v1.2.0

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

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

func (*Idemixgen) SignerConfig added in v1.2.0

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 added in v1.2.0

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

func (*Orderer) New added in v1.2.0

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

type Peer added in v1.2.0

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

func (*Peer) ChaincodeListInstalled added in v1.2.0

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

func (*Peer) ChaincodeListInstantiated added in v1.2.0

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

func (*Peer) CreateChannel added in v1.2.0

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

func (*Peer) FetchChannel added in v1.2.0

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

func (*Peer) GetChannelInfo added in v1.2.0

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

func (*Peer) InstallChaincode added in v1.2.0

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

func (*Peer) InstantiateChaincode added in v1.2.0

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

func (*Peer) InvokeChaincode added in v1.2.0

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

func (*Peer) JoinChannel added in v1.2.0

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

func (*Peer) NodeStart added in v1.2.0

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

func (*Peer) QueryChaincode added in v1.2.0

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

func (*Peer) SetLogLevel added in v1.2.0

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

func (*Peer) SignConfigTx added in v1.2.0

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

func (*Peer) UpdateChannel added in v1.2.0

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