anchorstatus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *Store)

Option is an option for registered store.

func WithCheckStatusAfterTime

func WithCheckStatusAfterTime(duration time.Duration) Option

WithCheckStatusAfterTime sets optional check status interval.

func WithMaxRecordsPerInterval

func WithMaxRecordsPerInterval(value int) Option

WithMaxRecordsPerInterval sets the maximum number of anchor status records to process per monitoring interval.

func WithMonitoringInterval

func WithMonitoringInterval(value time.Duration) Option

WithMonitoringInterval sets the anchor status record monitoring interval.

func WithPolicyHandler

func WithPolicyHandler(ph policyHandler) Option

WithPolicyHandler sets optional policy handler.

type Store

type Store struct {
	*lifecycle.Lifecycle
	// contains filtered or unexported fields
}

Store is db implementation of anchor index status store.

func New

func New(provider storage.Provider, taskMgr taskManager, expiryService *expiry.Service,
	maxWitnessDelay time.Duration, opts ...Option,
) (*Store, error)

New creates new anchor event status store.

func (*Store) AddStatus

func (s *Store) AddStatus(anchorID string, status proof.AnchorIndexStatus) error

AddStatus adds verifiable credential proof collecting status.

func (*Store) CheckInProcessAnchors

func (s *Store) CheckInProcessAnchors() time.Duration

CheckInProcessAnchors will be invoked to check for incomplete (not processed) anchors.

func (*Store) GetStatus

func (s *Store) GetStatus(anchorID string) (proof.AnchorIndexStatus, error)

GetStatus retrieves proof collection status for the given verifiable credential.

Jump to

Keyboard shortcuts

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