Documentation ¶
Index ¶
- func WithSession(ctx context.Context) context.Context
- type IPLDGetter
- func (ig *IPLDGetter) GetEDS(ctx context.Context, root *share.Root) (*rsmt2d.ExtendedDataSquare, error)
- func (ig *IPLDGetter) GetShare(ctx context.Context, dah *share.Root, row, col int) (share.Share, error)
- func (ig *IPLDGetter) GetSharesByNamespace(ctx context.Context, root *share.Root, nID namespace.ID) (share.NamespacedShares, error)
- type StoreGetter
- func (sg *StoreGetter) GetEDS(ctx context.Context, root *share.Root) (*rsmt2d.ExtendedDataSquare, error)
- func (sg *StoreGetter) GetShare(ctx context.Context, dah *share.Root, row, col int) (share.Share, error)
- func (sg *StoreGetter) GetSharesByNamespace(ctx context.Context, root *share.Root, nID namespace.ID) (share.NamespacedShares, error)
- type TeeGetter
- func (tg *TeeGetter) GetEDS(ctx context.Context, root *share.Root) (*rsmt2d.ExtendedDataSquare, error)
- func (tg *TeeGetter) GetShare(ctx context.Context, root *share.Root, row, col int) (share.Share, error)
- func (tg *TeeGetter) GetSharesByNamespace(ctx context.Context, root *share.Root, id namespace.ID) (share.NamespacedShares, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPLDGetter ¶
type IPLDGetter struct {
// contains filtered or unexported fields
}
IPLDGetter is a share.Getter that retrieves shares from the bitswap network. Result caching is handled by the provided blockservice. A blockservice session will be created for retrieval if the passed context is wrapped with WithSession.
func NewIPLDGetter ¶
func NewIPLDGetter(bServ blockservice.BlockService) *IPLDGetter
NewIPLDGetter creates a new share.Getter that retrieves shares from the bitswap network.
func (*IPLDGetter) GetEDS ¶
func (ig *IPLDGetter) GetEDS(ctx context.Context, root *share.Root) (*rsmt2d.ExtendedDataSquare, error)
func (*IPLDGetter) GetShare ¶
func (ig *IPLDGetter) GetShare(ctx context.Context, dah *share.Root, row, col int) (share.Share, error)
GetShare gets a single share at the given EDS coordinates from the bitswap network.
func (*IPLDGetter) GetSharesByNamespace ¶
func (ig *IPLDGetter) GetSharesByNamespace( ctx context.Context, root *share.Root, nID namespace.ID, ) (share.NamespacedShares, error)
type StoreGetter ¶
type StoreGetter struct {
// contains filtered or unexported fields
}
StoreGetter is a share.Getter that retrieves shares from an eds.Store. No results are saved to the eds.Store after retrieval.
func NewStoreGetter ¶
func NewStoreGetter(store *eds.Store) *StoreGetter
NewStoreGetter creates a new share.Getter that retrieves shares from an eds.Store.
func (*StoreGetter) GetEDS ¶
func (sg *StoreGetter) GetEDS(ctx context.Context, root *share.Root) (*rsmt2d.ExtendedDataSquare, error)
GetEDS gets the EDS identified by the given root from the EDS store.
func (*StoreGetter) GetShare ¶
func (sg *StoreGetter) GetShare(ctx context.Context, dah *share.Root, row, col int) (share.Share, error)
GetShare gets a single share at the given EDS coordinates from the eds.Store through the corresponding CAR-level blockstore.
func (*StoreGetter) GetSharesByNamespace ¶
func (sg *StoreGetter) GetSharesByNamespace( ctx context.Context, root *share.Root, nID namespace.ID, ) (share.NamespacedShares, error)
GetSharesByNamespace gets all EDS shares in the given namespace from the EDS store through the corresponding CAR-level blockstore.