Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorGraph ¶
type AnchorGraph interface { Read(hl string) (*linkset.Linkset, 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.
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 Option ¶ added in v0.1.2
type Option func(opts *options)
Option is an option for observer.
func WithDiscoveryDomain ¶ added in v0.1.2
WithDiscoveryDomain sets optional discovery domain hint (used for did equivalent ids).
func WithSubscriberPoolSize ¶ added in v1.0.0
WithSubscriberPoolSize sets the size of the message queue subscriber pool.
type Providers ¶
type Providers struct { ProtocolClientProvider protocol.ClientProvider AnchorGraph DidAnchors didAnchors PubSub pubSub Metrics metricsProvider Outbox outboxProvider WebFingerResolver resourceResolver CASResolver casResolver DocLoader documentLoader Pkf verifiable.PublicKeyFetcher AnchorLinkStore anchorLinkStore }
Providers contains all of the providers required by the TxnProcessor.
type PubSub ¶ added in v0.1.2
PubSub implements a publisher/subscriber that publishes anchors and DIDs to a queue and processes anchors and DIDs published to the queue.
func NewPubSub ¶ added in v0.1.2
func NewPubSub(pubSub pubSub, anchorProcessor anchorProcessor, didProcessor didProcessor, poolSize int) (*PubSub, error)
NewPubSub returns a new publisher/subscriber.
func (*PubSub) PublishAnchor ¶ added in v0.1.2
func (h *PubSub) PublishAnchor(anchorInfo *anchorinfo.AnchorInfo) error
PublishAnchor publishes the anchor to the queue for processing.
func (*PubSub) PublishDID ¶ added in v0.1.2
PublishDID publishes the DID to the queue for processing.
type Publisher ¶ added in v0.1.2
type Publisher interface { PublishAnchor(anchor *anchorinfo.AnchorInfo) error PublishDID(did string) error }
Publisher publishes anchors and DIDs to a message queue for processing.