pipeline

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pipeline provides tools to work with one of more pipelines.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStatusNonRetryable = errors.New("non retryable error")
	ErrStatusRetryable    = errors.New("retryable error")
	ErrStatusInProgress   = errors.New("waitable error")
)
View Source
var ErrUnknownPipeline = errors.New("unknown pipeline")

Functions

func IngestStatus

func IngestStatus(ctx context.Context, ingestService amclient.IngestService, ID string) error

IngestStatus returns a non-nil error when the SIP is not fully ingested.

func NewService added in v0.24.0

func NewService(logger logr.Logger, registry *Registry) *pipelineImpl

func TransferStatus

func TransferStatus(ctx context.Context, transferService amclient.TransferService, ID string) (string, error)

TransferStatus returns a non-nil error when the transfer is not fully transferred.

Types

type Config

type Config struct {
	ID                 string
	Name               string
	BaseURL            string
	User               string
	Key                string
	TransferDir        string
	TransferLocationID string
	ProcessingDir      string
	ProcessingConfig   string
	StorageServiceURL  string
	Capacity           uint64
	RetryDeadline      *time.Duration
	TransferDeadline   *time.Duration
}

type Pipeline added in v0.5.2

type Pipeline struct {

	// ID (UUID) of the pipeline. This is not provided by the user but loaded
	// on demand once we have access to the pipeline API.
	ID string
	// contains filtered or unexported fields
}

func NewPipeline added in v0.5.2

func NewPipeline(logger logr.Logger, config Config) (*Pipeline, error)

func (*Pipeline) Capacity added in v0.32.0

func (p *Pipeline) Capacity() (size, cur int64)

func (*Pipeline) Client added in v0.5.2

func (p *Pipeline) Client() *amclient.Client

Client returns the Archivematica API client ready for use.

func (*Pipeline) Config added in v0.5.2

func (p *Pipeline) Config() *Config

func (*Pipeline) Release added in v0.17.0

func (p *Pipeline) Release()

func (*Pipeline) SSAccess added in v0.14.0

func (p *Pipeline) SSAccess() (*url.URL, string, error)

SSAccess returns the URL and user:key pair needed to access Storage Service.

func (*Pipeline) Status added in v0.37.0

func (p *Pipeline) Status(ctx context.Context) string

func (*Pipeline) TempFile added in v0.5.2

func (p *Pipeline) TempFile(pattern string) (*os.File, error)

TempFile creates a temporary file in the processing directory.

func (*Pipeline) TryAcquire added in v0.24.1

func (p *Pipeline) TryAcquire() bool

type Registry added in v0.5.2

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

Registry is a collection of known pipelines.

func NewPipelineRegistry

func NewPipelineRegistry(logger logr.Logger, configs []Config) (*Registry, error)

func (*Registry) ByID added in v0.14.0

func (r *Registry) ByID(id string) (*Pipeline, error)

func (*Registry) ByName added in v0.14.0

func (r *Registry) ByName(name string) (*Pipeline, error)

func (*Registry) List added in v0.24.0

func (r *Registry) List() []*Pipeline

func (*Registry) Names added in v0.36.0

func (r *Registry) Names() []string

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.
sync
semaphore
Package semaphore provides a weighted semaphore implementation.
Package semaphore provides a weighted semaphore implementation.

Jump to

Keyboard shortcuts

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