boshdirector

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: Apache-2.0 Imports: 13 Imported by: 9

Documentation

Index

Constants

View Source
const (
	StemcellDirectorVersionType                          = VersionType("stemcell")
	SemverDirectorVersionType                            = VersionType("semver")
	MinimumMajorStemcellDirectorVersionForODB            = 3262
	MinimumMajorSemverDirectorVersionForLifecycleErrands = 261
)
View Source
const (
	TaskQueued     = "queued"
	TaskProcessing = "processing"
	TaskDone       = "done"
	TaskError      = "error"
	TaskCancelled  = "cancelled"
	TaskCancelling = "cancelling"
	TaskTimeout    = "timeout"

	TaskComplete TaskStateType = iota
	TaskIncomplete
	TaskFailed
	TaskUnknown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHeaderBuilder

type AuthHeaderBuilder interface {
	Build(logger *log.Logger) (string, error)
}

type BoshTask

type BoshTask struct {
	ID          int
	State       string
	Description string
	Result      string
	ContextID   string `json:"context_id,omitempty"`
}

func (BoshTask) StateType

func (t BoshTask) StateType() TaskStateType

func (BoshTask) ToLog

func (t BoshTask) ToLog() string

type BoshTaskOutput

type BoshTaskOutput struct {
	ExitCode int    `json:"exit_code"`
	StdOut   string `json:"stdout"`
	StdErr   string `json:"stderr"`
}

type BoshTasks

type BoshTasks []BoshTask

func (BoshTasks) DoneTasks

func (t BoshTasks) DoneTasks() BoshTasks

func (BoshTasks) FailedTasks

func (t BoshTasks) FailedTasks() BoshTasks

func (BoshTasks) IncompleteTasks

func (t BoshTasks) IncompleteTasks() BoshTasks

func (BoshTasks) ToLog

func (t BoshTasks) ToLog() string

type BoshVMsOutput

type BoshVMsOutput struct {
	IPs           []string
	InstanceGroup string `json:"job_name"`
}

type Client

type Client struct {
	PollingInterval time.Duration
	// contains filtered or unexported fields
}

func New

func New(url string, authHeaderBuilder AuthHeaderBuilder, disableSSLCertVerification bool, trustedCertPEM []byte) (*Client, error)

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(name, contextID string, logger *log.Logger) (int, error)

func (*Client) Deploy

func (c *Client) Deploy(manifest []byte, contextID string, logger *log.Logger) (int, error)

func (*Client) GetDeployment

func (c *Client) GetDeployment(name string, logger *log.Logger) ([]byte, bool, error)

func (*Client) GetDeployments

func (c *Client) GetDeployments(logger *log.Logger) ([]Deployment, error)

func (*Client) GetDirectorVersion

func (c *Client) GetDirectorVersion(logger *log.Logger) (Version, error)

func (*Client) GetNormalisedTasksByContext

func (c *Client) GetNormalisedTasksByContext(deploymentName, contextID string, logger *log.Logger) (BoshTasks, error)

func (*Client) GetTask

func (c *Client) GetTask(taskID int, logger *log.Logger) (BoshTask, error)

func (*Client) GetTaskOutput

func (c *Client) GetTaskOutput(taskID int, logger *log.Logger) ([]BoshTaskOutput, error)

func (*Client) GetTasks

func (c *Client) GetTasks(deploymentName string, logger *log.Logger) (BoshTasks, error)

func (*Client) RunErrand

func (c *Client) RunErrand(deploymentName, errandName, contextID string, logger *log.Logger) (int, error)

func (*Client) VMs

func (c *Client) VMs(name string, logger *log.Logger) (bosh.BoshVMs, error)

func (*Client) VMsOutput

func (c *Client) VMsOutput(taskID int, logger *log.Logger) ([]BoshVMsOutput, error)

type Deployment

type Deployment struct {
	Name string
}

type DeploymentNotFoundError

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

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type Info

type Info struct {
	Version string
}

type Poller

type Poller interface {
	PollUntil(Probe) error
}

type Probe

type Probe func() (bool, error)

type RequestError

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

func NewRequestError

func NewRequestError(e error) RequestError

type SleepingPoller

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

func (*SleepingPoller) PollUntil

func (p *SleepingPoller) PollUntil(probe Probe) error

type TaskStateType

type TaskStateType int

type Version

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

func NewVersion

func NewVersion(majorVersion int, versionType VersionType) Version

func (Version) SupportsLifecycleErrands

func (v Version) SupportsLifecycleErrands() bool

func (Version) SupportsODB

func (v Version) SupportsODB() bool

type VersionType

type VersionType string

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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