Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MetaDataColName is the name of the metadata collection used by the Observer // to store peer-specific information MetaDataColName = "meta_data" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientProviders ¶ added in v0.1.4
type ClientProviders struct { OffLedger common.OffLedgerClientProvider Blockchain common.BlockchainClientProvider Gossip common.GossipProvider CacheInvalidatorProvider cacheInvalidatorProvider }
ClientProviders contains the providers for off-ledger, DCAS, and blockchain clients
type Metadata ¶ added in v0.1.4
type Metadata struct { LastBlockProcessed uint64 LastTxNumProcessed int64 LeaseOwner string FailedAttempts int LastErrorCode transienterr.Code }
Metadata contains meta-data for the document store
type MetadataStore ¶ added in v0.1.4
type MetadataStore struct {
// contains filtered or unexported fields
}
MetadataStore manages the persistence and retrieval of peer-specific metadata
func NewMetaDataStore ¶ added in v0.1.4
func NewMetaDataStore(channelID string, peerConfig peerConfig, ccName string, offLedgerProvider common.OffLedgerClientProvider) *MetadataStore
NewMetaDataStore returns a new meta data store
func (*MetadataStore) Get ¶ added in v0.1.4
func (m *MetadataStore) Get() (*Metadata, error)
Get retrieves the meta-data for this peer
func (*MetadataStore) Put ¶ added in v0.1.4
func (m *MetadataStore) Put(data *Metadata) error
Put persists the meta data for this peer
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer reads blocks from the ledger looking for Sidetree anchor writes and persists the document operations to the document store.
func New ¶
func New(channelID string, peerCfg peerConfig, observerCfg config.Observer, clientProviders *ClientProviders, txnChan <-chan gossipapi.TxMetadata, pcp ctxcommon.ProtocolClientProvider) *Observer
New returns a new Observer
Click to show internal directories.
Click to hide internal directories.