configupdate

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

configupdate is an implementation of the broadcast.Proccessor interface It facilitates the preprocessing of CONFIG_UPDATE transactions which can generate either new CONFIG transactions or new channel creation ORDERER_TRANSACTION messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

func New

func New(systemChannelID string, supportManager SupportManager, signer crypto.LocalSigner) *Processor

func (*Processor) Process

func (p *Processor) Process(envConfigUpdate *cb.Envelope) (*cb.Envelope, error)

Process takes in an envelope of type CONFIG_UPDATE and proceses it to transform it either into to a new channel creation request, or into a channel CONFIG transaction (or errors on failure)

type Support

type Support interface {
	// ProposeConfigUpdate applies a CONFIG_UPDATE to an existing config to produce a *cb.ConfigEnvelope
	ProposeConfigUpdate(env *cb.Envelope) (*cb.ConfigEnvelope, error)
}

Support enumerates a subset of the full channel support function which is required for this package

type SupportManager

type SupportManager interface {
	// GetChain gets the chain support for a given ChannelId
	GetChain(chainID string) (Support, bool)

	// NewChannelConfig returns a bare bones configuration ready for channel
	// creation request to be applied on top of it
	NewChannelConfig(envConfigUpdate *cb.Envelope) (configtxapi.Manager, error)
}

SupportManager provides a way for the Handler to look up the Support for a chain

Jump to

Keyboard shortcuts

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