resource

package
v0.0.0-...-0e89551 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("script aborted")
View Source
var ErrUnknownResourceType = errors.New("unknown resource type")

Functions

func ResourcesDir

func ResourcesDir(suffix string) string

Types

type ArtifactDestination

type ArtifactDestination interface {
	StreamIn(string, io.Reader) error
}

type ArtifactSource

type ArtifactSource interface {
	StreamTo(ArtifactDestination) error
}

type ContainerImage

type ContainerImage string

type ErrResourceScriptFailed

type ErrResourceScriptFailed struct {
	Path       string
	Args       []string
	ExitStatus int

	Stderr string
}

func (ErrResourceScriptFailed) Error

func (err ErrResourceScriptFailed) Error() string

type IOConfig

type IOConfig struct {
	Stdout io.Writer
	Stderr io.Writer
}

type Resource

type Resource interface {
	Type() ResourceType

	Get(IOConfig, atc.Source, atc.Params, atc.Version) VersionedSource
	Put(IOConfig, atc.Source, atc.Params, ArtifactSource) VersionedSource

	Check(atc.Source, atc.Version) ([]atc.Version, error)

	Release()
	Destroy() error
}

func NewResource

func NewResource(
	container worker.Container,
	typ ResourceType,
) Resource

type ResourceType

type ResourceType string

type Session

type Session struct {
	ID        worker.Identifier
	Ephemeral bool
}

type Tracker

type Tracker interface {
	Init(Session, ResourceType, atc.Tags) (Resource, error)
}

func NewTracker

func NewTracker(workerClient worker.Client) Tracker

type VersionedSource

type VersionedSource interface {
	ifrit.Runner

	Version() atc.Version
	Metadata() []atc.MetadataField

	StreamOut(string) (io.ReadCloser, error)
	StreamIn(string, io.Reader) error
}

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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