pinner

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOpts = &PinManagerOpts{
	MaxActivePerUser: 15,
	QueueDataDir:     "/tmp/",
}

Functions

This section is empty.

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 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 PinManagerOpts struct {
	MaxActivePerUser int
	QueueDataDir     string
}

type PinStatusFunc

type PinStatusFunc func(contID uint, location string, status types.PinningStatus) error

type PinningOperationData added in v0.1.11

type PinningOperationData struct {
	ContId uint
}

type ShuttleManager added in v0.3.0

type ShuttleManager struct {
	*PinManager
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL