activities

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package activities implements Enduro's workflow activities.

Index

Constants

View Source
const (
	AcquirePipelineActivityName  = "acquire-pipeline-activity"
	DownloadActivityName         = "download-activity"
	BundleActivityName           = "bundle-activity"
	TransferActivityName         = "transfer-activity"
	PollTransferActivityName     = "poll-transfer-activity"
	PollIngestActivityName       = "poll-ingest-activity"
	CleanUpActivityName          = "clean-up-activity"
	HidePackageActivityName      = "hide-package-activity"
	DeleteOriginalActivityName   = "delete-original-activity"
	DisposeOriginalActivityName  = "dispose-original-activity"
	ValidateTransferActivityName = "validate-transfer-activity"
	PopulateMetadataActivityName = "populate-metadata-activity"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AcquirePipelineActivity added in v0.17.0

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

AcquirePipelineActivity acquires a lock in the weighted semaphore associated to a particular pipeline.

func NewAcquirePipelineActivity added in v0.17.0

func NewAcquirePipelineActivity(pipelineRegistry *pipeline.Registry) *AcquirePipelineActivity

func (*AcquirePipelineActivity) Execute added in v0.17.0

func (a *AcquirePipelineActivity) Execute(ctx context.Context, pipelineName string) error

type BundleActivity

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

func NewBundleActivity

func NewBundleActivity(m *manager.Manager) *BundleActivity

func (*BundleActivity) Bundle

func (a *BundleActivity) Bundle(ctx context.Context, unar archiver.Unarchiver, transferDir, key, tempFile string, stripTopLevelDir bool) (string, string, error)

Bundle a transfer with the contents found in the archive.

func (*BundleActivity) Copy added in v0.30.0

func (a *BundleActivity) Copy(ctx context.Context, src, dst string, stripTopLevelDir bool, excludeHiddenFiles bool) (string, string, error)

Copy a transfer in the given destination using an intermediate temp. directory.

func (*BundleActivity) Execute

func (*BundleActivity) SingleFile

func (a *BundleActivity) SingleFile(ctx context.Context, transferDir, key, tempFile string) (string, error)

SingleFile bundles a transfer with the downloaded blob in it.

func (*BundleActivity) Unarchiver

func (a *BundleActivity) Unarchiver(key, filename string) archiver.Unarchiver

Unarchiver returns the unarchiver suited for the archival format.

type BundleActivityParams

type BundleActivityParams struct {
	WatcherName        string
	TransferDir        string
	Key                string
	TempFile           string
	StripTopLevelDir   bool
	ExcludeHiddenFiles bool
	IsDir              bool
	BatchDir           string
	Unbag              bool
}

type BundleActivityResult

type BundleActivityResult struct {
	RelPath             string // Path of the transfer relative to the transfer directory.
	FullPath            string // Full path to the transfer in the worker running the session.
	FullPathBeforeStrip string // Same as FullPath but includes the top-level dir even when stripped.
}

type CleanUpActivity

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

CleanUpActivity removes the contents that we've created in the TS location.

func NewCleanUpActivity

func NewCleanUpActivity(m *manager.Manager) *CleanUpActivity

func (*CleanUpActivity) Execute

func (a *CleanUpActivity) Execute(ctx context.Context, params *CleanUpActivityParams) error

type CleanUpActivityParams

type CleanUpActivityParams struct {
	FullPath string
}

type DeleteOriginalActivity

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

func NewDeleteOriginalActivity

func NewDeleteOriginalActivity(m *manager.Manager) *DeleteOriginalActivity

func (*DeleteOriginalActivity) Execute

func (a *DeleteOriginalActivity) Execute(ctx context.Context, watcherName, batchDir, key string) error

type DisposeOriginalActivity added in v0.34.0

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

func NewDisposeOriginalActivity added in v0.34.0

func NewDisposeOriginalActivity(m *manager.Manager) *DisposeOriginalActivity

func (*DisposeOriginalActivity) Execute added in v0.34.0

func (a *DisposeOriginalActivity) Execute(ctx context.Context, watcherName, completedDir, batchDir, key string) error

type DownloadActivity

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

DownloadActivity downloads the blob into the pipeline processing directory.

func NewDownloadActivity

func NewDownloadActivity(m *manager.Manager) *DownloadActivity

func (*DownloadActivity) Execute

func (a *DownloadActivity) Execute(ctx context.Context, pipelineName, watcherName, key string) (string, error)

type HidePackageActivity

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

func NewHidePackageActivity

func NewHidePackageActivity(m *manager.Manager) *HidePackageActivity

func (*HidePackageActivity) Execute

func (a *HidePackageActivity) Execute(ctx context.Context, unitID, unitType, pipelineName string) error

type PollIngestActivity

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

func NewPollIngestActivity

func NewPollIngestActivity(pipelineRegistry *pipeline.Registry) *PollIngestActivity

func (*PollIngestActivity) Execute

type PollIngestActivityParams

type PollIngestActivityParams struct {
	PipelineName string
	SIPID        string
}

type PollTransferActivity

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

PollTransferActivity polls the Transfer Status API repeatedly until processing completes or when an error is considered non permanent.

It is expected to deliver at least on heartbeat per minute.

func NewPollTransferActivity

func NewPollTransferActivity(pipelineRegistry *pipeline.Registry) *PollTransferActivity

func (*PollTransferActivity) Execute

type PollTransferActivityParams

type PollTransferActivityParams struct {
	PipelineName string
	TransferID   string
}

type PopulateMetadataActivity added in v0.41.0

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

PopulateMetadataActivity populates the DC identifier in the transfer metadata CSV document.

func NewPopulateMetadataActivity added in v0.41.0

func NewPopulateMetadataActivity(pipelineRegistry *pipeline.Registry) *PopulateMetadataActivity

func (*PopulateMetadataActivity) Execute added in v0.41.0

type PopulateMetadataActivityParams added in v0.41.0

type PopulateMetadataActivityParams struct {
	Path       string
	Identifier string
}

type TransferActivity

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

TransferActivity submits the transfer to Archivematica and returns its ID.

This is our first interaction with Archivematica. The workflow ends here after authentication errors.

func NewTransferActivity

func NewTransferActivity(m *manager.Manager) *TransferActivity

func (*TransferActivity) Execute

type TransferActivityParams

type TransferActivityParams struct {
	PipelineName       string
	TransferLocationID string
	RelPath            string
	Name               string
	ProcessingConfig   string
	TransferType       string
	Accession          string
}

type TransferActivityResponse

type TransferActivityResponse struct {
	TransferID      string
	PipelineVersion string
	PipelineID      string
}

type ValidateTransferActivity added in v0.29.0

type ValidateTransferActivity struct{}

func NewValidateTransferActivity added in v0.29.0

func NewValidateTransferActivity() *ValidateTransferActivity

func (*ValidateTransferActivity) Execute added in v0.29.0

type ValidateTransferActivityParams added in v0.29.0

type ValidateTransferActivityParams struct {
	Config validation.Config
	Path   string
}

Jump to

Keyboard shortcuts

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