applyspec

package
v0.0.0-...-e2c346a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPackageMap

func NewPackageMap(packageBlobs map[string]bmstemcell.Blob) map[string]Blob

NewPackageMap creates an map of applyspec package blobs (indexed by name) from a stemcell apply spec

Types

type ApplySpec

type ApplySpec struct {
	Deployment               string                       `json:"deployment"`
	Index                    int                          `json:"index"`
	Packages                 map[string]Blob              `json:"packages"`
	Networks                 map[string]interface{}       `json:"networks"`
	Job                      Job                          `json:"job"`
	RenderedTemplatesArchive RenderedTemplatesArchiveSpec `json:"rendered_templates_archive"`
	ConfigurationHash        string                       `json:"configuration_hash"`
}

ApplySpec is the transport layer model for communicating instance state to the bosh-agent. The format is suboptimal for its current usage. :(

type Blob

type Blob struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	SHA1        string `json:"sha1"`
	BlobstoreID string `json:"blobstore_id"`
}

Blob is a reference to a named and versioned object, with an archive uploaded to the blobstore.

type Job

type Job struct {
	Name      string `json:"name"`
	Templates []Blob `json:"templates"`
}

Job is a description of an instance, and the 'jobs' running on it. Naming uses the historical Job/Templates pattern for reverse compatibility. The Templates refer to release jobs to run on this instance, rendered specifically for this instance. The SHA/BlobstoreID of the 'Templates' are currently being ignored by the bosh-agent, because the RenderedTemplatesArchive contains the aggregate of all rendered jobs' templates. If we get to a v2 ApplySpec format, this should be flattened into the ApplySpec, with 'Templates' renamed to 'Jobs'.

func NewJob

func NewJob(name string, templateBlobs []bmstemcell.Blob) Job

NewJob creates an applyspec job from a stemcell apply spec

type RenderedTemplatesArchiveSpec

type RenderedTemplatesArchiveSpec struct {
	BlobstoreID string `json:"blobstore_id"`
	SHA1        string `json:"sha1"`
}

RenderedTemplatesArchiveSpec is a reference to the aggregate job template archive, uploaded to the blobstore.

Jump to

Keyboard shortcuts

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