basestore

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 33 Imported by: 2

Documentation

Overview

basestore defines a set of operations common to the different store types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBaseIndex

func NewBaseIndex(publicKey []byte) iface.StoreIndex

NewBaseIndex Creates a new basic index

func NewNoopIndex added in v1.15.0

func NewNoopIndex(_ []byte) iface.StoreIndex

NewBaseIndex Creates a new basic index

func SaveSnapshot added in v1.2.1

func SaveSnapshot(ctx context.Context, b iface.Store) (cid.Cid, error)

Types

type BaseStore

type BaseStore struct {

	// Deprecated: if possible don't use this, use EventBus() directly instead
	events.EventEmitter
	// contains filtered or unexported fields
}

BaseStore The base of other stores

func (*BaseStore) AccessController

func (b *BaseStore) AccessController() accesscontroller.Interface

func (*BaseStore) AddOperation

func (b *BaseStore) AddOperation(ctx context.Context, op operation.Operation, onProgressCallback chan<- ipfslog.Entry) (ipfslog.Entry, error)

func (*BaseStore) Address

func (b *BaseStore) Address() address.Address

func (*BaseStore) Cache added in v1.1.1

func (b *BaseStore) Cache() datastore.Datastore

func (*BaseStore) Close

func (b *BaseStore) Close() error

func (*BaseStore) DBName

func (b *BaseStore) DBName() string

func (*BaseStore) Drop

func (b *BaseStore) Drop() error

func (*BaseStore) EventBus added in v1.15.0

func (b *BaseStore) EventBus() event.Bus

func (*BaseStore) IO added in v1.11.0

func (b *BaseStore) IO() ipfslog.IO

func (*BaseStore) IPFS

func (b *BaseStore) IPFS() coreapi.CoreAPI

func (*BaseStore) Identity

func (b *BaseStore) Identity() *identityprovider.Identity

func (*BaseStore) Index

func (b *BaseStore) Index() iface.StoreIndex

func (*BaseStore) InitBaseStore

func (b *BaseStore) InitBaseStore(ipfs coreapi.CoreAPI, identity *identityprovider.Identity, addr address.Address, options *iface.NewStoreOptions) error

InitBaseStore Initializes the store base

func (*BaseStore) Load

func (b *BaseStore) Load(ctx context.Context, amount int) error

func (*BaseStore) LoadFromSnapshot

func (b *BaseStore) LoadFromSnapshot(ctx context.Context) error

func (*BaseStore) LoadMoreFrom

func (b *BaseStore) LoadMoreFrom(ctx context.Context, amount uint, entries []ipfslog.Entry)

func (*BaseStore) Logger added in v1.4.0

func (b *BaseStore) Logger() *zap.Logger

func (*BaseStore) OpLog

func (b *BaseStore) OpLog() ipfslog.Log

func (*BaseStore) ReplicationStatus

func (b *BaseStore) ReplicationStatus() replicator.ReplicationInfo

func (*BaseStore) Replicator added in v1.1.1

func (b *BaseStore) Replicator() replicator.Replicator

func (*BaseStore) SortFn added in v1.2.1

func (b *BaseStore) SortFn() ipfslog.SortFn

func (*BaseStore) Sync

func (b *BaseStore) Sync(ctx context.Context, heads []ipfslog.Entry) error

func (*BaseStore) Tracer added in v1.5.0

func (b *BaseStore) Tracer() trace.Tracer

func (*BaseStore) Type

func (b *BaseStore) Type() string

type CanAppendContext added in v0.1.0

type CanAppendContext struct {
	// contains filtered or unexported fields
}

func (*CanAppendContext) GetLogEntries added in v0.1.0

func (c *CanAppendContext) GetLogEntries() []logac.LogEntry

Jump to

Keyboard shortcuts

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