channelconfig

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminsPolicyKey     = "Admins"
	ReadersPolicyKey    = "Readers"
	WritersPolicyKey    = "Writers"
	OrdererGroupKey     = "Orderer"
	ApplicationGroupKey = "Application"
	ConsortiumsGroupKey = "Consortiums"
	ConsortiumKey       = "Consortium"
	HashingAlgorithmKey = "HashingAlgorithm"

	BlockDataHashingStructureKey = "BlockDataHashingStructure"

	OrdererAddressesKey      = "OrdererAddresses"
	CapabilitiesKey          = "Capabilities"
	BatchSizeKey             = "BatchSize"
	BatchTimeoutKey          = "BatchTimeout"
	ChannelRestrictionsKey   = "ChannelRestrictions"
	KafkaBrokersKey          = "KafkaBrokers"
	ConsensusTypeKey         = "ConsensusType"
	MSPKey                   = "MSP"
	EndpointsKey             = "Endpoints"
	ACLsKey                  = "ACLs"
	AnchorPeersKey           = "AnchorPeers"
	ChannelCreationPolicyKey = "ChannelCreationPolicy"
	OrderersKey              = "Orderers"
)

Variables

This section is empty.

Functions

func MarshalBFTOptions added in v0.0.1

func MarshalBFTOptions(op *smartbft.Options) ([]byte, error)

MarshalBFTOptions serializes smartbft options.

func MarshalEtcdRaftMetadata

func MarshalEtcdRaftMetadata(md *etcdraft.ConfigMetadata) ([]byte, error)

MarshalEtcdRaftMetadata serializes etcd RAFT metadata.

Types

type ConfigValue

type ConfigValue interface {
	// Key is the key this value should be stored in the *cb.ConfigGroup.Values map.
	Key() string

	// Value is the message which should be marshaled to opaque bytes for the *cb.ConfigValue.value.
	Value() proto.Message
}

ConfigValue defines a common representation for different *cb.ConfigValue values.

type StandardConfigValue

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

StandardConfigValue implements the ConfigValue interface.

func ACLValues

func ACLValues(acls map[string]string) *StandardConfigValue

ACLValues returns the config definition for an applications resources based ACL definitions. It is a value for the /Channel/Application/.

func AnchorPeersValue

func AnchorPeersValue(anchorPeers []*pb.AnchorPeer) *StandardConfigValue

AnchorPeersValue returns the config definition for an org's anchor peers. It is a value for the /Channel/Application/*.

func BatchSizeValue

func BatchSizeValue(maxMessages, absoluteMaxBytes, preferredMaxBytes uint32) *StandardConfigValue

BatchSizeValue returns the config definition for the orderer batch size. It is a value for the /Channel/Orderer group.

func BatchTimeoutValue

func BatchTimeoutValue(timeout string) *StandardConfigValue

BatchTimeoutValue returns the config definition for the orderer batch timeout. It is a value for the /Channel/Orderer group.

func BlockDataHashingStructureValue

func BlockDataHashingStructureValue() *StandardConfigValue

BlockDataHashingStructureValue returns the only currently valid block data hashing structure. It is a value for the /Channel group.

func CapabilitiesValue

func CapabilitiesValue(capabilities map[string]bool) *StandardConfigValue

CapabilitiesValue returns the config definition for a a set of capabilities. It is a value for the /Channel/Orderer, Channel/Application/, and /Channel groups.

func ChannelCreationPolicyValue

func ChannelCreationPolicyValue(policy *common.Policy) *StandardConfigValue

ChannelCreationPolicyValue returns the config definition for a consortium's channel creation policy It is a value for the /Channel/Consortiums/*/*.

func ChannelRestrictionsValue

func ChannelRestrictionsValue(maxChannelCount uint64) *StandardConfigValue

ChannelRestrictionsValue returns the config definition for the orderer channel restrictions. It is a value for the /Channel/Orderer group.

func ConsensusTypeValue

func ConsensusTypeValue(consensusType string, consensusMetadata []byte) *StandardConfigValue

ConsensusTypeValue returns the config definition for the orderer consensus type. It is a value for the /Channel/Orderer group.

func ConsortiumValue

func ConsortiumValue(name string) *StandardConfigValue

ConsortiumValue returns the config definition for the consortium name. It is a value for the channel group.

func EndpointsValue

func EndpointsValue(addresses []string) *StandardConfigValue

EndpointsValue returns the config definition for the orderer addresses at an org scoped level. It is a value for the /Channel/Orderer/<OrgName> group.

func HashingAlgorithmValue

func HashingAlgorithmValue() *StandardConfigValue

HashingAlgorithmValue returns the only currently valid hashing algorithm. It is a value for the /Channel group.

func MSPValue

func MSPValue(mspDef *mspprotos.MSPConfig) *StandardConfigValue

MSPValue returns the config definition for an MSP. It is a value for the /Channel/Orderer/*, /Channel/Application/*, and /Channel/Consortiums/*/*/* groups.

func OrdererAddressesValue

func OrdererAddressesValue(addresses []string) *StandardConfigValue

OrdererAddressesValue returns the a config definition for the orderer addresses. It is a value for the /Channel group.

func OrderersValue added in v0.0.1

func OrderersValue(consenters []*common.Consenter) *StandardConfigValue

func (*StandardConfigValue) Key

func (scv *StandardConfigValue) Key() string

Key is the key this value should be stored in the *cb.ConfigGroup.Values map.

func (*StandardConfigValue) Value

func (scv *StandardConfigValue) Value() proto.Message

Value is the message which should be marshaled to opaque bytes for the *cb.ConfigValue.value.

Jump to

Keyboard shortcuts

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