world

package
v0.0.0-...-6f64d5f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 21 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
}

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() *runner.Configtxgen

func (*Components) Cryptogen

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

func (*Components) Idemixgen

func (c *Components) Idemixgen() *runner.Idemixgen

func (*Components) Kafka

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

func (*Components) Orderer

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

func (*Components) Peer

func (c *Components) Peer() *runner.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          runner.Cryptogen
	Idemixgen          runner.Idemixgen
	SystemChannel      string

	DockerClient  *docker.Client
	LocalStoppers []Stopper
	LocalProcess  []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