Back to godoc.org

Package backend

v0.0.0-...-3d889b7
Latest Go to latest

The latest major version is .

Published: Apr 13, 2018 | License: Apache-2.0 | Module: code.cloudfoundry.org/stager

Index

Constants

const (
	TaskLogSource                 = "STG"
	DefaultStagingTimeout         = 15 * time.Minute
	TrustedSystemCertificatesPath = "/etc/cf-system-certificates"
)
const (
	TraditionalLifecycleName = "buildpack"
	StagingTaskCpuWeight     = uint32(50)

	DefaultLANG = "en_US.UTF-8"
)
const (
	DockerLifecycleName         = "docker"
	MountCgroupsPath            = "/tmp/docker_app_lifecycle/mount_cgroups"
	DockerBuilderExecutablePath = "/tmp/docker_app_lifecycle/builder"
	DockerBuilderOutputPath     = "/tmp/docker-result/result.json"
)

Variables

var ErrMissingAppBitsDownloadUri = errors.New(diego_errors.MISSING_APP_BITS_DOWNLOAD_URI_MESSAGE)
var ErrMissingAppId = errors.New(diego_errors.MISSING_APP_ID_MESSAGE)
var ErrMissingDockerCredentials = errors.New(diego_errors.MISSING_DOCKER_CREDENTIALS)
var ErrMissingDockerImageUrl = errors.New(diego_errors.MISSING_DOCKER_IMAGE_URL)
var ErrMissingLifecycleData = errors.New(diego_errors.MISSING_LIFECYCLE_DATA_MESSAGE)
var ErrNoCompilerDefined = errors.New(diego_errors.NO_COMPILER_DEFINED_MESSAGE)

func SanitizeErrorMessage

func SanitizeErrorMessage(message string) *cc_messages.StagingError

type Backend

type Backend interface {
	BuildRecipe(stagingGuid string, request cc_messages.StagingRequestFromCC) (*models.TaskDefinition, string, string, error)
	BuildStagingResponse(*models.TaskCallbackResponse) (cc_messages.StagingResponseForCC, error)
}

go:generate counterfeiter -o fake_backend/fake_backend.go . Backend

func NewDockerBackend

func NewDockerBackend(config Config, logger lager.Logger) Backend

func NewTraditionalBackend

func NewTraditionalBackend(config Config, logger lager.Logger) Backend

type Config

type Config struct {
	TaskDomain               string
	StagerURL                string
	FileServerURL            string
	CCUploaderURL            string
	Lifecycles               map[string]string
	InsecureDockerRegistries []string
	ConsulCluster            string
	SkipCertVerify           bool
	Sanitizer                FailureReasonSanitizer
	DockerStagingStack       string
	PrivilegedContainers     bool
}

func (Config) CallbackURL

func (c Config) CallbackURL(stagingGuid string) string

type FailureReasonSanitizer

type FailureReasonSanitizer func(string) *cc_messages.StagingError

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier