helpers

package
v1.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertImagesExist

func AssertImagesExist(imageNames ...string)

func CheckConfigContainsExpectedConfig

func CheckConfigContainsExpectedConfig(expectedConfig discovery.ConfigResult, actualConfig discovery.ConfigResult) bool

Verifies that discovery service expectedConfig can be found in actualConfig. The check is done by comparing orderers (name, host and port) and by comparing msps(only name)

func CheckEndorsementContainsExpectedEndorsement

func CheckEndorsementContainsExpectedEndorsement(expectedEndorsement EndorsementDescriptor, actualEndorsement EndorsementDescriptor) bool

Verifies that actualEndorsement contains expectedEndorsement. The check is done by comparing the following fields: - Chaincode - identical in both endorsement descriptors - EndorsersByGroups - each group of DiscoveredPeer in expectedEndorsement can be found also in actualEndorsement. different calls to discovery service might generate different groups names - Layouts - all layouts that exist in expectedEndorsement can be found also in actualEndorsement. the function takes care of different names also in this check

func CheckPeersContainsExpectedPeers

func CheckPeersContainsExpectedPeers(expectedPeers []DiscoveredPeer, actualPeers []DiscoveredPeer) bool

Verifies that each DiscveredPeer in expectedPeers exist in actualPeers. The check is done by comparing peer endpoint and mspid and ignores ledger height, identity and chaincodes.

func Contains

func Contains(list []string, value string) bool

func CopyFile

func CopyFile(src, dest string)

func Execute

func Execute(r ifrit.Runner) (err error)

func StartSession

func StartSession(cmd *exec.Cmd, name, ansiColorCode string) (*gexec.Session, error)

func UniqueName

func UniqueName() string

UniqueName generates base-32 enocded UUIDs for container names.

Types

type DiscoveredPeer

type DiscoveredPeer struct {
	MSPID        string
	LedgerHeight uint64
	Endpoint     string
	Identity     string
	Chaincodes   []string
}

type EndorsementDescriptor

type EndorsementDescriptor struct {
	Chaincode         string
	EndorsersByGroups map[string][]DiscoveredPeer
	Layouts           []*discovery.Layout
}

Jump to

Keyboard shortcuts

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