Documentation ¶
Index ¶
- type CPU
- type Cfg
- type Client
- func (c *Client) Cleanup(removeAll bool) (Task, error)
- func (c *Client) CreateDeployment(manifest string) (Task, error)
- func (c *Client) DeleteDeployment(name string) (Task, error)
- func (c *Client) DoRequest(r *request) (*http.Response, error)
- func (c *Client) DoRequestAndUnmarshal(r *request, objPtr interface{}) error
- func (c *Client) GetCloudConfig(latest bool) ([]Cfg, error)
- func (c *Client) GetDeployment(name string) (Manifest, error)
- func (c *Client) GetDeploymentVMs(name string) ([]VM, error)
- func (c *Client) GetDeployments() ([]Deployment, error)
- func (c *Client) GetInfo() (Info, error)
- func (c *Client) GetReleases() ([]Release, error)
- func (c *Client) GetStemcells() ([]Stemcell, error)
- func (c *Client) GetTask(id int) (Task, error)
- func (c *Client) GetTaskEvents(id int) ([]TaskEvent, error)
- func (c *Client) GetTaskOutput(id int, typ string) ([]string, error)
- func (c *Client) GetTaskResult(id int) ([]string, error)
- func (c *Client) GetTasks() ([]Task, error)
- func (c *Client) GetTasksByQuery(query url.Values) ([]Task, error)
- func (c *Client) GetToken() (string, error)
- func (c *Client) GetUUID() (string, error)
- func (c *Client) NewRequest(method, path string) *request
- func (c *Client) Restart(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) RestartNoConverge(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) Start(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) StartNoConverge(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) Stop(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) StopNoConverge(deployment, jobName, instanceID string) (Task, error)
- func (c *Client) UUID() string
- func (c *Client) UpdateCloudConfig(config string) error
- func (c *Client) UploadRelease(url, sha1 string) (Task, error)
- func (c *Client) UploadStemcell(url, sha1 string) (Task, error)
- func (c *Client) WaitUntilDone(task Task, timeout time.Duration) (Task, error)
- type Config
- type Deployment
- type Disk
- type DiskStats
- type Endpoint
- type Event
- type Info
- type Manifest
- type Memory
- type Process
- type ProcessCPU
- type ProcessMemory
- type Release
- type ReleaseVersion
- type Resource
- type Stemcell
- type Task
- type TaskEvent
- type Uptime
- type UserAuthentication
- type VM
- type Vitals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cfg ¶
type Cfg struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Content string `json:"content"` CreatedAt int `json:"int"` Deleted bool `json:"deleted"` }
Cfg struct
type Client ¶
type Client struct { Endpoint Endpoint // contains filtered or unexported fields }
Client used to communicate with BOSH
func (*Client) Cleanup ¶
Cleanup will post to the cleanup endpoint of bosh, passing along the removeAll flag passed in as a bool
func (*Client) CreateDeployment ¶
CreateDeployment deploys the given deployment manifest
func (*Client) DeleteDeployment ¶
DeleteDeployment from given BOSH
func (*Client) DoRequestAndUnmarshal ¶
func (*Client) GetCloudConfig ¶
GetCloudConfig from given BOSH
func (*Client) GetDeployment ¶
GetDeployment returns a specific deployment by name from the given BOSH
func (*Client) GetDeploymentVMs ¶
GetDeploymentVMs returns all the VMs that make up the specified deployment
func (*Client) GetDeployments ¶
func (c *Client) GetDeployments() ([]Deployment, error)
GetDeployments returns all deployments from the given BOSH
func (*Client) GetReleases ¶
GetReleases from the given BOSH
func (*Client) GetStemcells ¶
GetStemcells from given BOSH
func (*Client) GetTaskEvents ¶
GetTaskEvents retrieves the events for the specified task
func (*Client) GetTaskOutput ¶
GetTaskOutput returns the completed tasks output
func (*Client) GetTaskResult ¶
GetTaskResult returns the tasks result
func (*Client) GetTasksByQuery ¶
GetTasksByQuery from given BOSH
func (*Client) NewRequest ¶
NewRequest is used to create a new request
func (*Client) RestartNoConverge ¶
func (*Client) StartNoConverge ¶
func (*Client) StopNoConverge ¶
func (*Client) UpdateCloudConfig ¶
UpdateCloudConfig updates the cloud config with the specified config
func (*Client) UploadRelease ¶
UploadRelease to the given BOSH
func (*Client) UploadStemcell ¶
UploadStemcell to the given BOSH
type Config ¶
type Config struct { BOSHAddress string Username string Password string ClientID string ClientSecret string UAAAuth bool HttpClient *http.Client SkipSslValidation bool TokenSource oauth2.TokenSource Endpoint *Endpoint }
Config is used to configure the creation of a client
type Deployment ¶
type Deployment struct { Name string `json:"name"` CloudConfig string `json:"cloud_config"` Releases []Resource `json:"releases"` Stemcells []Resource `json:"stemcells"` }
Deployment struct
func (*Deployment) HasRelease ¶
func (d *Deployment) HasRelease(name string) bool
HasRelease if deployment has release
type Disk ¶
type Disk struct { Ephemeral DiskStats `json:"ephemeral"` System DiskStats `json:"system"` Persistent DiskStats `json:"persistent"` }
Disk struct
type DiskStats ¶
type DiskStats struct { Percent string `json:"percent"` InodePercent string `json:"inode_percent"` }
DiskStats struct
type Endpoint ¶
type Endpoint struct {
URL string `json:"doppler_logging_endpoint"`
}
func DefaultEndpoint ¶
func DefaultEndpoint() *Endpoint
type Event ¶
type Event struct { ID string `json:"id"` ParentID string `json:"parent_id"` Timestamp int `json:"timestamp"` User string `json:"user"` Action string `json:"action"` ObjectType string `json:"object_type"` ObjectName string `json:"object_name"` Task string `json:"task"` Deployment string `json:"deployment"` Error string `json:"error"` Context map[string]interface{} `json:"context"` }
Event struct
type Info ¶
type Info struct { Name string `json:"name"` UUID string `json:"uuid"` Version string `json:"version"` User string `json:"user"` CPI string `json:"cpi"` UserAuthentication UserAuthentication `json:"user_authentication"` }
Info struct
type Process ¶
type Process struct { Name string `json:"name"` State string `json:"state"` Uptime Uptime `json:"uptime"` Mem ProcessMemory `json:"mem"` CPU ProcessCPU `json:"cpu"` }
Process running on a VM
type ProcessMemory ¶
ProcessMemory struct
type Release ¶
type Release struct { Name string `json:"name"` ReleaseVersions []ReleaseVersion `json:"release_versions"` }
Release struct
type ReleaseVersion ¶
type ReleaseVersion struct { Version string `json:"version"` CommitHash string `json:"commit_hash"` UncommittedChanges bool `json:"uncommitted_changes"` CurrentlyDeployed bool `json:"currently_deployed"` JobNames []string `json:"job_names"` }
ReleaseVersion struct
type Stemcell ¶
type Stemcell struct { Name string `json:"name"` OperatingSystem string `json:"operating_system"` Version string `json:"version"` CID string `json:"cid"` CPI string `json:"cpi"` Deployments []struct { Name string `json:"name"` } `json:"deployments"` }
Stemcell struct
type Task ¶
type Task struct { ID int `json:"id"` State string `json:"state"` Description string `json:"description"` Timestamp int `json:"timestamp"` Result string `json:"result"` User string `json:"user"` }
Task struct
type TaskEvent ¶
type TaskEvent struct { Time int `json:"time"` Stage string `json:"stage"` Tags []string `json:"tags"` Total int `json:"total"` Task string `json:"task"` Index int `json:"index"` State string `json:"state"` Progress int `json:"progress"` Error struct { Code int `json:"code"` Message string `json:"message"` } `json:"error"` }
TaskEvent struct
type UserAuthentication ¶
type UserAuthentication struct { Type string `json:"type"` Options struct { URL string `json:"url"` } `json:"options"` }
UserAuthentication struct
type VM ¶
type VM struct { VMCID string `json:"vm_cid"` IPs []string `json:"ips"` DNS []string `json:"dns"` AgentID string `json:"agent_id"` JobName string `json:"job_name"` Index int `json:"index"` JobState string `json:"job_state"` State string `json:"state"` ResourcePool string `json:"resource_pool"` VMType string `json:"vm_type"` Vitals Vitals `json:"vitals"` Processes []Process `json:"processes"` ResurrectionPaused bool `json:"resurrection_paused"` AZ string `json:"az"` ID string `json:"id"` Bootstrap bool `json:"bootstrap"` Ignore bool `json:"ignore"` }
VM struct