bosh

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

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

Variables

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

TASKRESULT -

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)
}

Bosh -

type BoshDirector

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

BoshDirector -

func NewBoshDirector

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

NewBoshDirector -

func (*BoshDirector) ChangeJobState

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

ChangeJobState -

func (*BoshDirector) GetDeploymentManifest

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

GetDeploymentManifest -

func (*BoshDirector) RetrieveTaskStatus

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

RetrieveTaskStatus -

type ManifestResponse

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

ManifestResponse -

type Task

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

Task -

type UrlBuilder

type UrlBuilder interface {
}

Jump to

Keyboard shortcuts

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