Documentation
¶
Index ¶
- Variables
- func NewGatewayAPI(baseURL string, sApi station.StationAPI, maxDownloadPerRequest uint64) *gatewayAPI
- type CarStore
- func (cs *CarStore) FetchAndWriteCAR(reqID uuid.UUID, root cid.Cid, writer func(bstore.Blockstore) error) error
- func (cs *CarStore) IsIndexed(ctx context.Context, root cid.Cid) (bool, error)
- func (cs *CarStore) Start(ctx context.Context) error
- func (cs *CarStore) Stat() (station.StorageStats, error)
- func (cs *CarStore) Stop() error
- type Config
- type GatewayAPI
- type GatewayMount
- func (g *GatewayMount) Close() error
- func (g *GatewayMount) Deserialize(u *url.URL) error
- func (g *GatewayMount) Fetch(ctx context.Context) (mount.Reader, error)
- func (g *GatewayMount) Info() mount.Info
- func (g *GatewayMount) Serialize() *url.URL
- func (l *GatewayMount) Stat(ctx context.Context) (mount.Stat, error)
- type GatewayReader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDownloadTooLarge means that the file being downloaded from the IPFS Gateway is larger than the // maximum size allowed. ErrDownloadTooLarge = errors.New("download is too large") )
View Source
var ( // ErrNotFound indicates that we do not have the requested CAR file in the car store ErrNotFound = errors.New("CAR not found") )
Functions ¶
func NewGatewayAPI ¶
func NewGatewayAPI(baseURL string, sApi station.StationAPI, maxDownloadPerRequest uint64) *gatewayAPI
Types ¶
type CarStore ¶
type CarStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(rootDir string, gwAPI GatewayAPI, cfg Config, logger *logs.SaturnLogger) (*CarStore, error)
func (*CarStore) FetchAndWriteCAR ¶
type GatewayAPI ¶
type GatewayMount ¶
type GatewayMount struct { API GatewayAPI RootCID cid.Cid }
func (*GatewayMount) Close ¶
func (g *GatewayMount) Close() error
func (*GatewayMount) Deserialize ¶
func (g *GatewayMount) Deserialize(u *url.URL) error
func (*GatewayMount) Info ¶
func (g *GatewayMount) Info() mount.Info
func (*GatewayMount) Serialize ¶
func (g *GatewayMount) Serialize() *url.URL
type GatewayReader ¶
type GatewayReader struct { io.ReadCloser io.ReaderAt io.Seeker // contains filtered or unexported fields }
func (*GatewayReader) Close ¶
func (gw *GatewayReader) Close() error
Click to show internal directories.
Click to hide internal directories.