policies

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockValidationPolicyKey = "BlockValidation"
)

Variables

This section is empty.

Functions

func ComputeBFTQuorum added in v0.0.1

func ComputeBFTQuorum(totalNodes, faultyNodes int) int32

func EncodeBFTBlockVerificationPolicy added in v0.0.1

func EncodeBFTBlockVerificationPolicy(consenterProtos []*cb.Consenter, ordererGroup *cb.ConfigGroup)

func ImplicitMetaFromString

func ImplicitMetaFromString(input string) (*cb.ImplicitMetaPolicy, error)

Types

type ConfigPolicy

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

	// Value is the backing policy implementation for this ConfigPolicy
	Value() *cb.Policy
}

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

type StandardConfigPolicy

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

StandardConfigPolicy implements the ConfigPolicy interface.

func ImplicitMetaAllPolicy

func ImplicitMetaAllPolicy(policyName string) *StandardConfigPolicy

ImplicitMetaAllPolicy defines an implicit meta policy whose sub_policy and key is policyname with rule ALL.

func ImplicitMetaAnyPolicy

func ImplicitMetaAnyPolicy(policyName string) *StandardConfigPolicy

ImplicitMetaAnyPolicy defines an implicit meta policy whose sub_policy and key is policyname with rule ANY.

func ImplicitMetaMajorityPolicy

func ImplicitMetaMajorityPolicy(policyName string) *StandardConfigPolicy

ImplicitMetaMajorityPolicy defines an implicit meta policy whose sub_policy and key is policyname with rule MAJORITY.

func SignaturePolicy

func SignaturePolicy(policyName string, sigPolicy *cb.SignaturePolicyEnvelope) *StandardConfigPolicy

SignaturePolicy defines a policy with key policyName and the given signature policy.

func (*StandardConfigPolicy) Key

func (scv *StandardConfigPolicy) Key() string

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

func (*StandardConfigPolicy) Value

func (scv *StandardConfigPolicy) Value() *cb.Policy

Value is the *cb.Policy which should be stored as the *cb.ConfigPolicy.Policy.

Jump to

Keyboard shortcuts

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