Documentation
¶
Index ¶
- Constants
- func ComputeBFTQuorum(totalNodes, faultyNodes int) int32
- func EncodeBFTBlockVerificationPolicy(consenterProtos []*cb.Consenter, ordererGroup *cb.ConfigGroup)
- func ImplicitMetaFromString(input string) (*cb.ImplicitMetaPolicy, error)
- type ConfigPolicy
- type StandardConfigPolicy
- func ImplicitMetaAllPolicy(policyName string) *StandardConfigPolicy
- func ImplicitMetaAnyPolicy(policyName string) *StandardConfigPolicy
- func ImplicitMetaMajorityPolicy(policyName string) *StandardConfigPolicy
- func SignaturePolicy(policyName string, sigPolicy *cb.SignaturePolicyEnvelope) *StandardConfigPolicy
Constants ¶
const (
BlockValidationPolicyKey = "BlockValidation"
)
Variables ¶
This section is empty.
Functions ¶
func ComputeBFTQuorum ¶ added in v0.0.1
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.