world

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright IBM Corp All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var RequiredImages = []string{
	"hyperledger/fabric-ccenv:latest",
	runner.CouchDBDefaultImage,
	runner.KafkaDefaultImage,
	runner.ZooKeeperDefaultImage,
}

Functions

This section is empty.

Types

type Chaincode

type Chaincode struct {
	Name                  string
	Path                  string
	Version               string
	GoPath                string
	ExecPath              string
	CollectionsConfigPath string
}

type Components

type Components struct {
	Paths map[string]string
}

func (*Components) Build

func (c *Components) Build(args ...string)

func (*Components) Cleanup

func (c *Components) Cleanup()

func (*Components) Configtxgen

func (c *Components) Configtxgen() *pvtdatarunner.Configtxgen

func (*Components) Cryptogen

func (c *Components) Cryptogen() *pvtdatarunner.Cryptogen

func (*Components) DiscoveryService

func (c *Components) DiscoveryService() *pvtdatarunner.DiscoveryService

func (*Components) Kafka

func (c *Components) Kafka(id int, network *docker.Network) *runner.Kafka

func (*Components) Orderer

func (c *Components) Orderer() *pvtdatarunner.Orderer

func (*Components) Peer

func (c *Components) Peer() *pvtdatarunner.Peer

func (*Components) ZooKeeper

func (c *Components) ZooKeeper(id int, network *docker.Network) *runner.ZooKeeper

type Deployment

type Deployment struct {
	Chaincode Chaincode
	Channel   string
	InitArgs  string
	Policy    string
	Orderer   string
}

type OrdererConfig

type OrdererConfig struct {
	OrganizationName              string
	Domain                        string
	OrdererNames                  []string
	BrokerCount                   int // 0 is solo
	ZooKeeperCount                int
	KafkaMinInsyncReplicas        int
	KafkaDefaultReplicationFactor int
}

type PeerOrgConfig

type PeerOrgConfig struct {
	OrganizationName string
	Domain           string
	EnableNodeOUs    bool
	UserCount        int
	PeerCount        int
}

type Profile

type Profile struct {
	Profiles map[string]localconfig.Profile `yaml:"Profiles"`
}

type Stopper

type Stopper interface {
	Stop() error
}

type World

type World struct {
	Rootpath           string
	Components         *Components
	Network            *docker.Network
	OrdererProfileName string
	ChannelProfileName string
	OrdererOrgs        []OrdererConfig
	PeerOrgs           []PeerOrgConfig
	Profiles           map[string]localconfig.Profile
	Cryptogen          pvtdatarunner.Cryptogen
	SystemChannel      string

	DockerClient         *docker.Client
	LocalStoppers        []Stopper
	LocalProcess         []ifrit.Process
	NameToProcessMapping map[string]ifrit.Process
}

func GenerateBasicConfig

func GenerateBasicConfig(ordererType string, numPeers, numPeerOrgs int, testDir string, components *Components) (w *World)

func (*World) BootstrapNetwork

func (w *World) BootstrapNetwork(channel string)

func (*World) BuildNetwork

func (w *World) BuildNetwork()

func (*World) Close

func (w *World) Close(deployments ...Deployment)

func (*World) Construct

func (w *World) Construct()

func (*World) CopyPeerConfigs

func (w *World) CopyPeerConfigs(fixtureDir string)

func (*World) PeerIDs

func (w *World) PeerIDs() []string

func (*World) SetupChannel

func (w *World) SetupChannel(d Deployment, peers []string)

func (*World) SetupWorld

func (w *World) SetupWorld(d Deployment)

Jump to

Keyboard shortcuts

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