txnprocessor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationStore

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

OperationStore interface to access operation store.

type Option added in v0.7.0

type Option func(opts *TxnProcessor)

Option is an option for transaction processor.

func WithUnpublishedOperationStore added in v0.7.0

func WithUnpublishedOperationStore(store unpublishedOperationStore, opTypes []operation.Type) Option

WithUnpublishedOperationStore is unpublished operation store option.

type Providers

type Providers struct {
	OpStore                   OperationStore
	OperationProtocolProvider protocol.OperationProvider
}

Providers contains the providers required by the TxnProcessor.

type TxnProcessor

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

TxnProcessor processes Sidetree transactions by persisting them to an operation store.

func New

func New(providers *Providers, opts ...Option) *TxnProcessor

New returns a new document operation processor.

func (*TxnProcessor) Process

func (p *TxnProcessor) Process(sidetreeTxn txn.SidetreeTxn, suffixes ...string) (int, error)

Process persists all the operations for the given anchor.

Jump to

Keyboard shortcuts

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