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 WithProofMonitoringExpiryPeriod ¶ added in v1.0.0
WithProofMonitoringExpiryPeriod sets expiry period for proof monitoring service.
func WithSubscriberPoolSize ¶ added in v1.0.0
WithSubscriberPoolSize sets the size of the message queue subscriber pool.
type Outbox ¶ added in v0.1.3
type Outbox interface {
Post(ctx context.Context, activity *vocab.ActivityType, exclude ...*url.URL) (*url.URL, error)
}
Outbox defines an ActivityPub outbox.
type Providers ¶
type Providers struct { ProtocolClientProvider protocol.ClientProvider AnchorGraph DidAnchors didAnchors PubSub pubSub Metrics metricsProvider Outbox outboxProvider HostMetaLinkResolver resourceResolver CASResolver casResolver DocLoader documentLoader Pkf verifiable.PublicKeyFetcher AnchorLinkStore anchorLinkStore MonitoringSvc monitoringSvc AnchorLinksetBuilder anchorLinksetBuilder }
Providers contains all of the providers required by the observer.
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(ctx context.Context, anchorInfo *anchorinfo.AnchorInfo) error
PublishAnchor publishes the anchor to the queue for processing.