cessna

package
v3.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

README

Cessna

Running Tests

  • Clone the echo-resource and follow its instructions to turn it into a RootFS tar

  • Ensure you have a running concourse (e.g. on bosh-lite) and take note of the IP address of a worker

  • Run

    env WORKER_IP=<worker-ip> TAR_PATH=<path/to/rootfs.tar> ginkgo -resource -p cessna
    

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("script aborted")

Functions

func NewWorker

func NewWorker(gardenAddr string, baggageclaimAddr string) *worker

Types

type BaseResourceType

type BaseResourceType struct {
	RootFSPath string
	Name       string
}

func (BaseResourceType) RootFSPathFor

func (r BaseResourceType) RootFSPathFor(logger lager.Logger, worker Worker) (string, error)

type CheckRequest

type CheckRequest struct {
	Source  atc.Source  `json:"source"`
	Version atc.Version `json:"version"`
}

type CheckResponse

type CheckResponse []atc.Version

type ContainerProcess

type ContainerProcess struct {
	Container garden.Container

	ProcessSpec garden.ProcessSpec
	ProcessIO   garden.ProcessIO
}

func (*ContainerProcess) Run

func (c *ContainerProcess) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type ErrScriptFailed

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

	Stderr string
	Stdout string
}

func (ErrScriptFailed) Error

func (err ErrScriptFailed) Error() string

type InRequest

type InRequest struct {
	Source  atc.Source  `json:"source"`
	Params  atc.Params  `json:"params"`
	Version atc.Version `json:"version"`
}

type InResponse

type InResponse struct {
	Version  atc.Version         `json:"version"`
	Metadata []atc.MetadataField `json:"metadata,omitempty"`
}

type NamedArtifacts

type NamedArtifacts map[string]baggageclaim.Volume

type OutRequest

type OutRequest struct {
	Source atc.Source `json:"source"`
	Params atc.Params `json:"params"`
}

type OutResponse

type OutResponse struct {
	Version  atc.Version         `json:"version"`
	Metadata []atc.MetadataField `json:"metadata,omitempty"`
}

type Resource

type Resource struct {
	ResourceType RootFSable
	Source       atc.Source
}

func NewBaseResource

func NewBaseResource(resourceType BaseResourceType, source atc.Source) Resource

type ResourceCheck

type ResourceCheck struct {
	Resource
	Version *atc.Version
}

func (ResourceCheck) Check

func (r ResourceCheck) Check(logger lager.Logger, worker Worker) (CheckResponse, error)

type ResourceGet

type ResourceGet struct {
	Resource
	Version atc.Version
	Params  atc.Params
}

func (ResourceGet) Get

func (r ResourceGet) Get(logger lager.Logger, worker Worker) (baggageclaim.Volume, error)

func (ResourceGet) RootFSPathFor

func (r ResourceGet) RootFSPathFor(logger lager.Logger, worker Worker) (string, error)

type ResourcePut

type ResourcePut struct {
	Resource
	Params atc.Params
}

func (ResourcePut) Put

func (r ResourcePut) Put(logger lager.Logger, worker Worker, artifacts NamedArtifacts) (OutResponse, error)

type RootFSable

type RootFSable interface {
	RootFSPathFor(logger lager.Logger, worker Worker) (string, error)
}

type Task

type Task struct {
	RootFSGenerator RootFSable
	Path            string
	Args            []string
	Env             []string
	Dir             string
	User            string
	Privileged      bool
}

func (*Task) Run

func (t *Task) Run(logger lager.Logger, worker Worker, inputs NamedArtifacts, outputs NamedArtifacts) error

func (*Task) RunnerFor

func (t *Task) RunnerFor(logger lager.Logger, container garden.Container, workingDir string) *taskContainerProcess

type TaskResponse

type TaskResponse struct {
}

type Worker

type Worker interface {
	GardenClient() garden.Client
	BaggageClaimClient() baggageclaim.Client
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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