boshdirector

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StemcellDirectorVersionType = VersionType("stemcell")
	SemverDirectorVersionType   = VersionType("semver")
)
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 {
	AddAuthHeader(request *http.Request, logger *log.Logger) error
}

TODO: check if we can remove this interface

type AuthenticationOptions added in v0.17.2

type AuthenticationOptions struct {
	URL string
}

type AuthenticatorBuilder added in v0.18.0

type AuthenticatorBuilder interface {
	NewAuthHeaderBuilder(UAAURL string, disableSSLCertVerification bool) (config.AuthHeaderBuilder, 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 CertAppender added in v0.18.0

type CertAppender interface {
	AppendCertsFromPEM(pemCerts []byte) (ok bool)
}

type Client

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

func New

func New(url string, disableSSLCertVerification bool, trustedCertPEM []byte, httpClient NetworkDoer, authBuilder AuthenticatorBuilder, certAppender CertAppender, directorFactory DirectorFactory, uaaFactory UAAFactory, boshAuth config.BOSHAuthentication, logger *log.Logger) (*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) GetInfo added in v0.17.2

func (c *Client) GetInfo(logger *log.Logger) (Info, 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 string, errandInstances []string, 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)

func (*Client) VerifyAuth added in v0.17.2

func (c *Client) VerifyAuth(logger *log.Logger) error

type Deployment

type Deployment struct {
	Name string
}

type DeploymentNotFoundError

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

type Director added in v0.19.0

type Director interface {
	director.Director
}

type DirectorFactory added in v0.19.0

type DirectorFactory interface {
	New(config director.FactoryConfig, taskReporter director.TaskReporter, fileReporter director.FileReporter) (director.Director, error)
}

type Info

type Info struct {
	Version            string
	UserAuthentication UserAuthentication `json:"user_authentication"`
}

func (*Info) GetDirectorVersion added in v0.17.2

func (boshInfo *Info) GetDirectorVersion() (Version, error)

type Instance added in v0.18.0

type Instance struct {
	Group string `json:"group"`
	ID    string `json:"id,omitempty"`
}

type NetworkDoer added in v0.18.0

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

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 UAA added in v0.19.0

type UAA interface {
	boshuaa.UAA
}

type UAAFactory added in v0.19.0

type UAAFactory interface {
	New(config boshuaa.Config) (boshuaa.UAA, error)
}

type UserAuthentication added in v0.17.2

type UserAuthentication struct {
	Options AuthenticationOptions
}

type Version

type Version struct {
	MajorVersion int
	VersionType  VersionType
}

func NewVersion

func NewVersion(majorVersion int, versionType VersionType) Version

type VersionType

type VersionType string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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