policy

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WitnessPolicyKey is witness policy key in config store.
	WitnessPolicyKey = "witness-policy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WitnessPolicy

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

WitnessPolicy evaluates witness policy.

func New

func New(configStore storage.Store, policyCacheExpiry time.Duration) (*WitnessPolicy, error)

New parses witness policy from policy string.

func (*WitnessPolicy) Evaluate

func (wp *WitnessPolicy) Evaluate(witnesses []*proof.WitnessProof) (bool, error)

Evaluate evaluates if witness policy has been satisfied for provided witnesses.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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