pipeline

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 17 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, client *amclient.Client, 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, client *amclient.Client, 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
}

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(config Config) (*Pipeline, error)

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) 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

type Service added in v0.24.0

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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