config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutOf       = "OutOf"
	MinPercent  = "MinPercent"
	LogRequired = "LogRequired"

	AND = "AND"
	OR  = "OR"
)

Gate values.

View Source
const (
	RoleBatch  = "batch"
	RoleSystem = "system"
)

Role values.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements the witness policy config store.

func NewPolicyStore

func NewPolicyStore(store storage.Store) *Store

NewPolicyStore returns a new witness policy config store.

func (*Store) GetPolicy

func (s *Store) GetPolicy() (string, error)

GetPolicy returns the witness policy.

func (*Store) PutPolicy

func (s *Store) PutPolicy(policyStr string) error

PutPolicy stores the witness policy.

type WitnessPolicyConfig

type WitnessPolicyConfig struct {
	MinNumberSystem int
	MinNumberBatch  int

	MinPercentSystem int
	MinPercentBatch  int

	OperatorFnc operatorFnc
	Operator    string

	LogRequired bool
}

WitnessPolicyConfig parses witness policy.

func Parse

func Parse(policy string) (*WitnessPolicyConfig, error)

Parse parses witness policy from policy string.

func (*WitnessPolicyConfig) String

func (wp *WitnessPolicyConfig) String() string

Jump to

Keyboard shortcuts

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