Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOpts = &PinManagerOpts{
MaxActivePerUser: 15,
}
Functions ¶
This section is empty.
Types ¶
type PinFunc ¶
type PinFunc func(context.Context, *PinningOperation, PinProgressCB) error
type PinManager ¶
type PinManager struct {
RunPinFunc PinFunc
StatusChangeFunc PinStatusFunc
// contains filtered or unexported fields
}
func NewPinManager ¶
func NewPinManager(pinfunc PinFunc, scf PinStatusFunc, opts *PinManagerOpts) *PinManager
func (*PinManager) Add ¶
func (pm *PinManager) Add(op *PinningOperation)
func (*PinManager) PinQueueSize ¶
func (pm *PinManager) PinQueueSize() int
func (*PinManager) Run ¶
func (pm *PinManager) Run(workers int)
type PinManagerOpts ¶
type PinManagerOpts struct {
MaxActivePerUser int
}
type PinProgressCB ¶
type PinProgressCB func(int64)
type PinStatusFunc ¶
type PinStatusFunc func(contID uint, location string, status types.PinningStatus) error
type PinningOperation ¶
type PinningOperation struct {
Obj cid.Cid
Name string
Peers []*peer.AddrInfo
Meta string
Status types.PinningStatus
UserId uint
ContId uint
Replace uint
LastUpdate time.Time
Started time.Time
NumFetched int
SizeFetched int64
FetchErr error
EndTime time.Time
Location string
SkipLimiter bool
MakeDeal bool
// contains filtered or unexported fields
}
TODO: some of these fields are overkill for the generalized pin manager thing, but are still in use by the primary estuary node. Should probably find a way to decouple this better
func (*PinningOperation) PinStatus ¶
func (po *PinningOperation) PinStatus() *types.IpfsPinStatusResponse
func (*PinningOperation) SetStatus ¶
func (po *PinningOperation) SetStatus(st types.PinningStatus)
Click to show internal directories.
Click to hide internal directories.