Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIndexLocator ¶
func NewIndexLocator(indexer IndexerClient, authorizeRetrieval AuthorizeRetrievalFunc) *indexLocator
Types ¶
type AuthorizeRetrievalFunc ¶ added in v0.4.0
type AuthorizeRetrievalFunc func(spaces []did.DID) (delegation.Delegation, error)
AuthorizeRetrievalFunc creates a content retrieval authorization for the provided space(s).
It should create a short lived delegation that allows the indexing service to retrieve indexes from the space(s).
type IndexerClient ¶
type Location ¶
type Location struct {
Commitment ucan.Capability[assert.LocationCaveats]
Position blobindex.Position
}
type Locator ¶
type Locator interface {
// Locate finds and returns the locations of a single block identified by its
// digest. Returns a [NotFoundError] if no locations are found.
Locate(ctx context.Context, spaces []did.DID, digest mh.Multihash) ([]Location, error)
// LocateMany finds the locations of multiple blocks identified by their
// digests, returning a map from digest to locations. Digests with no found
// locations will be absent from the returned map.
LocateMany(ctx context.Context, spaces []did.DID, digests []mh.Multihash) (blobindex.MultihashMap[[]Location], error)
}
type NotFoundError ¶
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.