observer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorGraph

type AnchorGraph interface {
	Read(cid string) (*verifiable.Credential, error)
	GetDidAnchors(cid, suffix string) ([]graph.Anchor, error)
}

AnchorGraph interface to access anchors.

type Observer

type Observer struct {
	*Providers
	// contains filtered or unexported fields
}

Observer receives transactions over a channel and processes them by storing them to an operation store.

func New

func New(providers *Providers) *Observer

New returns a new observer.

func (*Observer) Start

func (o *Observer) Start()

Start starts observer routines.

func (*Observer) Stop

func (o *Observer) Stop()

Stop stops the observer.

type OperationFilter

type OperationFilter interface {
	Filter(uniqueSuffix string, ops []*operation.AnchoredOperation) ([]*operation.AnchoredOperation, error)
}

OperationFilter filters out operations before they are persisted.

type OperationStore

type OperationStore interface {
	Put(ops []*operation.AnchoredOperation) error
}

OperationStore interface to access operation store.

type Providers

type Providers struct {
	TxnProvider            TxnProvider
	ProtocolClientProvider protocol.ClientProvider
	AnchorGraph
	DidAnchors didAnchors
}

Providers contains all of the providers required by the TxnProcessor.

type TxnProvider

type TxnProvider interface {
	RegisterForAnchor() <-chan []anchorinfo.AnchorInfo
	RegisterForDID() <-chan []string
}

TxnProvider interface to access orb txn.

Jump to

Keyboard shortcuts

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