pipeline

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

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 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) Acquire added in v0.17.0

func (p *Pipeline) Acquire(ctx context.Context) 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.

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)

Jump to

Keyboard shortcuts

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