Documentation ¶
Index ¶
- Constants
- func NewLocalNodeGetter(api kubo.CoreAPI) (ipld.NodeGetter, error)
- func WriteError(w http.ResponseWriter, err error)
- func WriteSuccess(w http.ResponseWriter)
- func XX3HashBlockId(id cmipld.Cid, seed uint64) uint64
- type CancelParams
- type CarMirror
- func (cm *CarMirror) CancelHandler() http.HandlerFunc
- func (cm *CarMirror) LsHandler() http.HandlerFunc
- func (cm *CarMirror) NewPullSessionHandler() http.HandlerFunc
- func (cm *CarMirror) NewPushSessionHandler() http.HandlerFunc
- func (cm *CarMirror) StartRemote(ctx context.Context) error
- func (cm *CarMirror) StatsHandler() http.HandlerFunc
- type Config
- type KuboStore
- func (ks *KuboStore) Add(ctx context.Context, block cm.RawBlock[cmipld.Cid]) (cm.Block[cmipld.Cid], error)
- func (ks *KuboStore) AddMany(ctx context.Context, rawBlocks []cm.RawBlock[cmipld.Cid]) ([]cm.Block[cmipld.Cid], error)
- func (ks *KuboStore) All(ctx context.Context) (<-chan cmipld.Cid, error)
- func (ks *KuboStore) Get(ctx context.Context, cid cmipld.Cid) (cm.Block[cmipld.Cid], error)
- func (ks *KuboStore) Has(ctx context.Context, cid cmipld.Cid) (bool, error)
- type LsParams
- type LsResponse
- type PullParams
- type PushParams
- type StatsParams
Constants ¶
View Source
const HASH_FUNCTION = 3
View Source
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
func NewLocalNodeGetter ¶
func NewLocalNodeGetter(api kubo.CoreAPI) (ipld.NodeGetter, error)
NewLocalNodeGetter creates a local (no fetch) NodeGetter from a CoreAPI.
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
func WriteSuccess ¶
func WriteSuccess(w http.ResponseWriter)
Types ¶
type CancelParams ¶
type CancelParams struct {
Session string
}
type CarMirror ¶
type CarMirror struct {
// contains filtered or unexported fields
}
func New ¶
func New(capi coreiface.CoreAPI, blockStore *KuboStore, opts ...func(cfg *Config)) (*CarMirror, error)
New creates a local CAR Mirror service.
func (*CarMirror) CancelHandler ¶
func (cm *CarMirror) CancelHandler() http.HandlerFunc
func (*CarMirror) LsHandler ¶
func (cm *CarMirror) LsHandler() http.HandlerFunc
func (*CarMirror) NewPullSessionHandler ¶
func (cm *CarMirror) NewPullSessionHandler() http.HandlerFunc
func (*CarMirror) NewPushSessionHandler ¶
func (cm *CarMirror) NewPushSessionHandler() http.HandlerFunc
func (*CarMirror) StatsHandler ¶
func (cm *CarMirror) StatsHandler() http.HandlerFunc
type KuboStore ¶
type KuboStore struct {
// contains filtered or unexported fields
}
func NewKuboStore ¶
func (*KuboStore) All ¶
There doesn't seem to be a clear way to list all the CIDs since the underlying blockstore is not exposed in the core Kubo API. This method will therefore list the cids of all pinned objects
type LsResponse ¶
type PushParams ¶
type StatsParams ¶
type StatsParams struct {
Session string
}
Click to show internal directories.
Click to hide internal directories.