bosh

package
v2.0.81+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2016 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR      int = 1
	PROCESSING int = 2
	DONE       int = 3
	QUEUED     int = 4
)

Variables

View Source
var (
	TaskStatusCodeError         error = errors.New("The resp code from return task should return 200")
	ManifestStatusCodeError     error = errors.New("The retriveing bosh manifest API response code is not equal to 200")
	TaskRedirectStatusCodeError error = errors.New("The resp code after task creation should return 302")
	TaskResultUnknown           error = errors.New("TASK processed result is unknown")
)
View Source
var TASKRESULT map[string]int = map[string]int{"error": ERROR, "processing": PROCESSING, "done": DONE, "queued": QUEUED}

Functions

This section is empty.

Types

type Bosh

type Bosh interface {
	GetDeploymentManifest(deploymentName string) (io.Reader, error)
	//Currently there is a defect on bosh director we need to pass in the manifest file
	ChangeJobState(string, string, string, int, io.Reader) (int, error)
	RetrieveTaskStatus(int) (*Task, error)
}

type BoshDirector

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

func NewBoshDirector

func NewBoshDirector(ip, username, password string, port int, gateway http.HttpGateway) *BoshDirector

func (*BoshDirector) ChangeJobState

func (director *BoshDirector) ChangeJobState(deploymentName, jobName, state string, index int, manifest io.Reader) (taskId int, err error)

func (*BoshDirector) GetDeploymentManifest

func (director *BoshDirector) GetDeploymentManifest(deploymentName string) (manifest io.Reader, err error)

func (*BoshDirector) RetrieveTaskStatus

func (director *BoshDirector) RetrieveTaskStatus(taskId int) (task *Task, err error)

type ManifestResponse

type ManifestResponse struct {
	Manifest string `json:"manifest"`
}

type Task

type Task struct {
	Id          int    `json:"id"`
	State       string `json:"state"`
	Description string `json:"description"`
	Result      string `json:"result"`
}

type UrlBuilder

type UrlBuilder interface {
}

Jump to

Keyboard shortcuts

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