indexprovider

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0, MIT Imports: 39 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStringSkipAdIngest = "content not found"

While ingesting cids for each piece, if there is an error the indexer checks if the error contains the string "content not found": - if so, the indexer skips the piece and continues ingestion - if not, the indexer pauses ingestion

Functions

func NewWrapper

func NewWrapper(cfg *config.Boost) func(lc fx.Lifecycle, h host.Host, r repo.LockedRepo, dealsDB *db.DealsDB,
	ssDB *db.SectorStateDB, legacyProv gfm_storagemarket.StorageProvider, prov provider.Interface, dagStore *dagstore.Wrapper,
	meshCreator idxprov.MeshCreator, storageService lotus_modules.MinerStorageService) (*Wrapper, error)

Types

type ApiStorageMiner added in v1.7.0

type ApiStorageMiner interface {
	StorageList(ctx context.Context) (map[storiface.ID][]storiface.Decl, error)
	StorageRedeclareLocal(ctx context.Context, id *storiface.ID, dropMissing bool) error
}

type DisabledIndexProvider

type DisabledIndexProvider struct {
}

func NewDisabledIndexProvider

func NewDisabledIndexProvider() *DisabledIndexProvider

func (DisabledIndexProvider) GetAdv

func (d DisabledIndexProvider) GetAdv(ctx context.Context, cid cid.Cid) (*schema.Advertisement, error)

func (DisabledIndexProvider) GetLatestAdv

func (d DisabledIndexProvider) GetLatestAdv(ctx context.Context) (cid.Cid, *schema.Advertisement, error)

func (DisabledIndexProvider) NotifyPut

func (d DisabledIndexProvider) NotifyPut(ctx context.Context, provider *peer.AddrInfo, contextID []byte, md metadata.Metadata) (cid.Cid, error)

func (DisabledIndexProvider) NotifyRemove

func (d DisabledIndexProvider) NotifyRemove(ctx context.Context, providerID peer.ID, contextID []byte) (cid.Cid, error)

func (DisabledIndexProvider) Publish

func (d DisabledIndexProvider) Publish(ctx context.Context, advertisement schema.Advertisement) (cid.Cid, error)

func (DisabledIndexProvider) PublishLocal

func (d DisabledIndexProvider) PublishLocal(ctx context.Context, advertisement schema.Advertisement) (cid.Cid, error)

func (DisabledIndexProvider) RegisterMultihashLister

func (d DisabledIndexProvider) RegisterMultihashLister(lister provider.MultihashLister)

func (DisabledIndexProvider) Shutdown

func (d DisabledIndexProvider) Shutdown() error

type UnsealedStateManager added in v1.7.0

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

func NewUnsealedStateManager added in v1.7.0

func NewUnsealedStateManager(idxprov *Wrapper, legacyProv storagemarket.StorageProvider, dealsDB *db.DealsDB, sdb *db.SectorStateDB, api ApiStorageMiner, cfg config.StorageConfig) *UnsealedStateManager

func (*UnsealedStateManager) Run added in v1.7.0

func (m *UnsealedStateManager) Run(ctx context.Context)

type Wrapper

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

func (*Wrapper) AnnounceBoostDeal

func (w *Wrapper) AnnounceBoostDeal(ctx context.Context, deal *types.ProviderDealState) (cid.Cid, error)

func (*Wrapper) AnnounceBoostDealRemoved added in v1.7.0

func (w *Wrapper) AnnounceBoostDealRemoved(ctx context.Context, propCid cid.Cid) (cid.Cid, error)

func (*Wrapper) AnnounceExtendedProviders added in v1.5.1

func (w *Wrapper) AnnounceExtendedProviders(ctx context.Context) error

AnnounceExtendedProviders announces changes to Boost configuration in the context of retrieval methods.

The advertisement published by this function covers 3 cases:

1. bitswap is completely disabled: in which case an advertisement is published with empty extended providers that should wipe previous support on indexer side.

2. bitswap is enabled with public addresses: in which case publish an advertisement with extended providers records corresponding to the public addresses. Note, according the the IPNI spec, the host ID will also be added to the extended providers for signing reasons with empty metadata making a total of 2 extended provider records.

3. bitswap with boostd address: in which case public an advertisement with one extended provider record that just adds bitswap metadata.

Note that in any case one advertisement is published by boost on startup to reflect on bitswap configuration, even if the config remains the same. Future work should detect config change and only publish ads when config changes.

func (*Wrapper) DagstoreReinitBoostDeals

func (w *Wrapper) DagstoreReinitBoostDeals(ctx context.Context) (bool, error)

func (*Wrapper) Enabled

func (w *Wrapper) Enabled() bool

func (*Wrapper) IndexerAnnounceAllDeals

func (w *Wrapper) IndexerAnnounceAllDeals(ctx context.Context) error

func (*Wrapper) IndexerAnnounceLatest added in v1.7.3

func (w *Wrapper) IndexerAnnounceLatest(ctx context.Context) (cid.Cid, error)

func (*Wrapper) IndexerAnnounceLatestHttp added in v1.7.3

func (w *Wrapper) IndexerAnnounceLatestHttp(ctx context.Context, announceUrls []string) (cid.Cid, error)

func (*Wrapper) MultihashLister added in v1.7.3

func (w *Wrapper) MultihashLister(ctx context.Context, prov peer.ID, contextID []byte) (provider.MultihashIterator, error)

func (*Wrapper) Start

func (w *Wrapper) Start(ctx context.Context)

func (*Wrapper) Stop added in v1.7.1

func (w *Wrapper) Stop()

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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