Documentation ¶
Index ¶
- Constants
- Variables
- func GetPin(param GetPinParam) (*types.IpfsPinStatusResponse, error)
- func PinCidAndRequestMakeDeal(param PinCidParam) (*types.IpfsPinStatusResponse, *operation.PinningOperation, error)
- type EstuaryPinManager
- type GetPinParam
- type PinCidParam
- type PinFunc
- type PinManager
- type PinManagerOpts
- type PinStatusFunc
- type PinningHelperError
- type PinningOperationData
- type ShuttleManager
Constants ¶
View Source
const (
ColDir string = "dir"
)
Variables ¶
View Source
var DefaultOpts = &PinManagerOpts{
MaxActivePerUser: 15,
QueueDataDir: "/tmp/",
}
Functions ¶
func GetPin ¶ added in v0.3.9
func GetPin(param GetPinParam) (*types.IpfsPinStatusResponse, error)
GetPinStatus returns the status of a pin operation
func PinCidAndRequestMakeDeal ¶ added in v0.3.9
func PinCidAndRequestMakeDeal(param PinCidParam) (*types.IpfsPinStatusResponse, *operation.PinningOperation, error)
PinCidAndQueue adds a cid to the pin queue, and pins it if possible
Types ¶
type EstuaryPinManager ¶ added in v0.3.0
type EstuaryPinManager struct { *PinManager // contains filtered or unexported fields }
func NewEstuaryPinManager ¶ added in v0.3.0
func NewEstuaryPinManager(pinfunc PinFunc, scf PinStatusFunc, opts *PinManagerOpts, cm *contentmgr.ContentManager, shuttleMgr shuttle.IManager) *EstuaryPinManager
func (*EstuaryPinManager) RunPinningRetryWorker ¶ added in v0.3.0
func (pm *EstuaryPinManager) RunPinningRetryWorker(ctx context.Context, db *gorm.DB, cfg *config.Estuary)
RunPinningRetryWorker re-attempt pinning contents that have not yet been pinned after a period of time
type GetPinParam ¶ added in v0.3.9
type GetPinParam struct { Ctx echo.Context CM *contentmgr.ContentManager Db *gorm.DB User *util.User CidToGet string }
type PinCidParam ¶ added in v0.3.9
type PinFunc ¶
type PinFunc func(context.Context, *operation.PinningOperation, progress.PinProgressCB) error
type PinManager ¶
type PinManager struct { RunPinFunc PinFunc StatusChangeFunc PinStatusFunc QueueDataDir string // contains filtered or unexported fields }
func NewShuttlePinManager ¶ added in v0.3.0
func NewShuttlePinManager(pinfunc PinFunc, scf PinStatusFunc, opts *PinManagerOpts) *PinManager
func (*PinManager) Add ¶
func (pm *PinManager) Add(op *operation.PinningOperation)
func (*PinManager) PinQueueSize ¶
func (pm *PinManager) PinQueueSize() int
func (*PinManager) Run ¶
func (pm *PinManager) Run(workers int)
type PinManagerOpts ¶
type PinStatusFunc ¶
type PinStatusFunc func(contID uint64, location string, status types.PinningStatus) error
type PinningHelperError ¶ added in v0.3.9
type PinningOperationData ¶ added in v0.1.11
type PinningOperationData struct {
ContId uint64
}
type ShuttleManager ¶ added in v0.3.0
type ShuttleManager struct {
*PinManager
}
Click to show internal directories.
Click to hide internal directories.