pinner

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0, MIT Imports: 23 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 PinManager

type PinManager struct {
	RunPinFunc       PinFunc
	StatusChangeFunc PinStatusFunc

	QueueDataDir string
	// contains filtered or unexported fields
}

func NewPinManager

func NewPinManager(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)

func (*PinManager) RunPinningRetryWorker added in v0.2.3

func (pm *PinManager) RunPinningRetryWorker(ctx context.Context, db *gorm.DB, cfg *config.Estuary, cm *contentmgr.ContentManager)

RunPinningRetryWorker re-attempt pinning contents that have not yet been pinned after a period of time

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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