chconfig

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannelCfg

func NewChannelCfg(name string) fab.ChannelCfg

NewChannelCfg creates channel cfg TODO: This is temporary, Remove once we have config injected in sdk

Types

type ChannelCfg

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

ChannelCfg contains channel configuration

func (*ChannelCfg) AnchorPeers

func (cfg *ChannelCfg) AnchorPeers() []*fab.OrgAnchorPeer

AnchorPeers returns anchor peers

func (*ChannelCfg) Msps

func (cfg *ChannelCfg) Msps() []*msp.MSPConfig

Msps returns msps

func (*ChannelCfg) Name

func (cfg *ChannelCfg) Name() string

Name returns name

func (*ChannelCfg) Orderers

func (cfg *ChannelCfg) Orderers() []string

Orderers returns orderers

func (*ChannelCfg) Versions

func (cfg *ChannelCfg) Versions() *fab.Versions

Versions returns versions

type ChannelConfig

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

ChannelConfig implements query channel configuration

func New

func New(ctx fab.Context, channelID string, options ...Option) (*ChannelConfig, error)

New channel config implementation

func (*ChannelConfig) Query

func (c *ChannelConfig) Query() (fab.ChannelCfg, error)

Query returns channel configuration

type Context

type Context struct {
	fab.ProviderContext
	fab.IdentityContext
}

Context holds the providers and identity

type Option

type Option func(opts *Opts) error

Option func for each Opts argument

func WithMinResponses

func WithMinResponses(min int) Option

WithMinResponses encapsulates minimum responses to Option

func WithOrderer

func WithOrderer(orderer string) Option

WithOrderer encapsulates orderer to Option

func WithPeers

func WithPeers(peers []fab.Peer) Option

WithPeers encapsulates peers to Option

type Opts

type Opts struct {
	Orderer      string     // if configured, channel config will be retrieved from this orderer
	Targets      []fab.Peer // if configured, channel config will be retrieved from peers (targets)
	MinResponses int        // used with targets option; min number of success responses (from targets/peers)
}

Opts contains options for retrieving channel configuration

Jump to

Keyboard shortcuts

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