bosh

package
v0.0.0-...-c96d7f2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config Config) Client

func (Client) Cleanup

func (c Client) Cleanup() (int, error)

func (Client) DeleteDeployment

func (c Client) DeleteDeployment(name string) error

func (Client) DeleteRelease

func (c Client) DeleteRelease(name, version string) error

func (Client) DeleteStemcell

func (c Client) DeleteStemcell(name, version string) error

func (Client) Deploy

func (c Client) Deploy(manifest []byte) (int, error)

func (Client) DeploymentVMs

func (c Client) DeploymentVMs(name string) ([]VM, error)

func (Client) Deployments

func (c Client) Deployments() ([]Deployment, error)

func (Client) DownloadManifest

func (c Client) DownloadManifest(deploymentName string) ([]byte, error)

func (Client) ExportRelease

func (c Client) ExportRelease(deploymentName, releaseName, releaseVersion, stemcellOS, stemcellVersion string) (string, error)

func (Client) GetConfig

func (c Client) GetConfig() Config

func (Client) GetTaskOutput

func (c Client) GetTaskOutput(taskId int) ([]TaskOutput, error)

func (Client) Info

func (c Client) Info() (DirectorInfo, error)

func (Client) Locks

func (c Client) Locks() ([]Lock, error)

func (Client) Release

func (c Client) Release(name string) (Release, error)

func (Client) ResolveManifestVersionsV2

func (c Client) ResolveManifestVersionsV2(manifestYAML []byte) ([]byte, error)

func (Client) Resource

func (c Client) Resource(resourceId string) (io.ReadCloser, error)

func (Client) Restart

func (c Client) Restart(deployment, job string, index int) error

func (Client) ScanAndFix

func (c Client) ScanAndFix(deploymentName, jobName string, jobIndices []int) error

func (Client) ScanAndFixAll

func (c Client) ScanAndFixAll(manifestYAML []byte) error

func (Client) SetVMResurrection

func (c Client) SetVMResurrection(deploymentName, jobName string, jobIndex int, enable bool) error

func (Client) StemcellByName

func (c Client) StemcellByName(name string) (Stemcell, error)

func (Client) StemcellByOS

func (c Client) StemcellByOS(os string) (Stemcell, error)

func (Client) TaskResult

func (c Client) TaskResult(taskId int) (map[string]interface{}, error)

func (Client) UpdateCloudConfig

func (c Client) UpdateCloudConfig(cloudConfig []byte) error

func (Client) UploadRelease

func (c Client) UploadRelease(contents SizeReader) (int, error)

func (Client) UploadStemcell

func (c Client) UploadStemcell(contents SizeReader) (int, error)

type Config

type Config struct {
	URL                 string
	Host                string
	DirectorCACert      string
	Username            string
	Password            string
	TaskPollingInterval time.Duration
	AllowInsecureSSL    bool
	Transport           http.RoundTripper
	UAA                 bool
}

type Deployment

type Deployment struct {
	Name        string
	Releases    []Release
	Stemcells   []Stemcell
	CloudConfig string
}

type DirectorInfo

type DirectorInfo struct {
	UUID string
	CPI  string
}

type InUse

type InUse struct {
	Use bool
}

func (InUse) Error

func (i InUse) Error() string

func (InUse) InUse

func (i InUse) InUse() bool

type Lock

type Lock struct {
	Type     string   `json:"type"`
	Resource []string `json:"resource"`
	Timeout  string   `json:"timeout"`
}

type Release

type Release struct {
	Name     string
	Versions []string
}

func NewRelease

func NewRelease() Release

func (Release) Latest

func (r Release) Latest() string

type SizeReader

type SizeReader interface {
	io.Reader
	Size() int64
}

func NewSizeReader

func NewSizeReader(reader io.Reader, size int64) SizeReader

type Stemcell

type Stemcell struct {
	Name     string
	OS       string
	Versions []string
}

func NewStemcell

func NewStemcell() Stemcell

func (Stemcell) Latest

func (s Stemcell) Latest() (string, error)

type Task

type Task struct {
	Id     int
	State  string
	Result string
}

type TaskError

type TaskError struct {
	Code    int
	Message string
}

func (TaskError) Error

func (te TaskError) Error() string

func (TaskError) ErrorCode

func (te TaskError) ErrorCode() int

type TaskOutput

type TaskOutput struct {
	Time     int64
	Error    TaskError
	Stage    string
	Tags     []string
	Total    int
	Task     string
	Index    int
	State    string
	Progress int
}

type VM

type VM struct {
	ID      string   `json:"id"`
	Index   int      `json:"index"`
	State   string   `json:"job_state"`
	JobName string   `json:"job_name"`
	IPs     []string `json:"ips"`
}

Jump to

Keyboard shortcuts

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