datasetworker

package
v0.2.39 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureParentDirectories added in v0.2.17

func EnsureParentDirectories(db *gorm.DB,
	item *model.Item, rootDirID uint64,
	directoryCache map[string]uint64) error

func ExtractFromFsObject added in v0.2.17

func ExtractFromFsObject(ctx context.Context, info fs.ObjectInfo) (size int64, hashValue string, lastModified time.Time, lastModifiedReliable bool)

func MaxSizeToSplitSize added in v0.2.17

func MaxSizeToSplitSize(m int64) int64

func PushItem added in v0.2.17

func PushItem(ctx context.Context, db *gorm.DB, obj fs.ObjectInfo,
	source model.Source, dataset model.Dataset,
	directoryCache map[string]uint64) (*model.Item, []model.ItemPart, error)

Types

type DatasetWorker

type DatasetWorker struct {
	// contains filtered or unexported fields
}

func NewDatasetWorker

func NewDatasetWorker(db *gorm.DB, config DatasetWorkerConfig) *DatasetWorker

func (DatasetWorker) Run

func (w DatasetWorker) Run(parent context.Context) error

type DatasetWorkerConfig

type DatasetWorkerConfig struct {
	Concurrency    int
	ExitOnComplete bool
	EnableScan     bool
	EnablePack     bool
	EnableDag      bool
	ExitOnError    bool
}

type DatasetWorkerThread

type DatasetWorkerThread struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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