testutils

package
v1.5.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MB = 1024 * 1024

Variables

This section is empty.

Functions

func AddConsortiumToConfig

func AddConsortiumToConfig(channelConfig *cb.Config, request AddConsortiumRequest) (*cb.Config, error)

func GetChannelProfileConfig

func GetChannelProfileConfig(
	ordService OrdererOrganization,
	members []PeerOrganization,
	consortiumName string,
	adminPolicy string,
) (*genesisconfig.Profile, error)

func GetConfigEnvelopeBytes

func GetConfigEnvelopeBytes(configUpdate *cb.ConfigUpdate) ([]byte, error)

func GetProfileConfig

func GetProfileConfig(
	ordOrgs []OrdererOrganization,
	config GenesisConfig,
) (*genesisconfig.Profile, error)

func NewChannelStore added in v1.2.1

func NewChannelStore() *channelStore

Types

type AddConsortiumRequest

type AddConsortiumRequest struct {
	Name          string
	Organizations []PeerOrganization
}

type ApplicationCapabilities

type ApplicationCapabilities struct {
	V2_0 bool
}

type ChannelCapabilities

type ChannelCapabilities struct {
	V2_0 bool
}

type ChannelOption added in v1.2.1

type ChannelOption func(*CreateChannelOptions)

func WithConsenters added in v1.2.1

func WithConsenters(consenters ...Consenter) ChannelOption

func WithName added in v1.2.1

func WithName(name string) ChannelOption

func WithOrdererOrgs added in v1.2.1

func WithOrdererOrgs(ordererOrgs ...OrdererOrg) ChannelOption

func WithPeerOrgs added in v1.2.1

func WithPeerOrgs(peerOrgs ...PeerOrg) ChannelOption

type Consenter added in v1.2.1

type Consenter struct {
	// contains filtered or unexported fields
}

func CreateConsenter added in v1.2.1

func CreateConsenter(host string, port int, tlsCert *x509.Certificate) Consenter

type Consortium

type Consortium struct {
	Name          string
	Organizations []*ConsortiumMember
}

type ConsortiumMember

type ConsortiumMember struct {
	MSPID string
}

type CreateChannelOptions added in v1.2.1

type CreateChannelOptions struct {
	// contains filtered or unexported fields
}

type GenesisConfig

type GenesisConfig struct {
	BatchTimeout            time.Duration // 2 seconds
	MaxMessageCount         int           // 500
	AbsoluteMaxBytes        int           // 10 * 1024 * 1024 = 10MB
	PreferredMaxBytes       int           // 2 * 1024 * 1024 = 2MB
	OrdererCapabilities     OrdererCapabilities
	ApplicationCapabilities ApplicationCapabilities
	ChannelCapabilities     ChannelCapabilities
	SnapshotIntervalSize    int    // 19
	TickInterval            string // 500ms
	ElectionTick            int    // 10
	HeartbeatTick           int    // 1
	MaxInflightBlocks       int    // 5
}

type OrdererCapabilities

type OrdererCapabilities struct {
	V2_0 bool
}

type OrdererNode

type OrdererNode struct {
	TLSCert string
	Host    string
	Port    int
}

type OrdererOrg added in v1.2.1

type OrdererOrg struct {
	// contains filtered or unexported fields
}

func CreateOrdererOrg added in v1.2.1

func CreateOrdererOrg(mspID string, tlsRootCert *x509.Certificate, signRootCert *x509.Certificate, ordererUrls []string) OrdererOrg

type OrdererOrganization

type OrdererOrganization struct {
	Nodes        []OrdererNode
	RootTLSCert  string
	RootSignCert string
	MspID        string
}

type PeerNode

type PeerNode struct {
	Host string
	Port int
}

type PeerOrg added in v1.2.1

type PeerOrg struct {
	// contains filtered or unexported fields
}

func CreatePeerOrg added in v1.2.1

func CreatePeerOrg(mspID string, tlsRootCert *x509.Certificate, signRootCert *x509.Certificate) PeerOrg

type PeerOrganization

type PeerOrganization struct {
	RootCert    string
	TLSRootCert string
	MspID       string
	Peers       []PeerNode
}

Jump to

Keyboard shortcuts

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