Documentation
¶
Index ¶
- type AdjustableClient
- type AdjustedClient
- type Adjustment
- type AllOrInstanceGroupOrInstanceSlug
- func (s AllOrInstanceGroupOrInstanceSlug) IndexOrID() string
- func (s AllOrInstanceGroupOrInstanceSlug) InstanceSlug() (InstanceSlug, bool)
- func (s AllOrInstanceGroupOrInstanceSlug) Name() string
- func (s AllOrInstanceGroupOrInstanceSlug) String() string
- func (s *AllOrInstanceGroupOrInstanceSlug) UnmarshalFlag(data string) error
- type AuthRequestAdjustment
- type CPIConfig
- type Client
- func (c Client) CPIConfigs() ([]CPIConfig, error)
- func (c Client) CancelTask(id int) error
- func (c Client) ChangeJobState(state, deploymentName, job, indexOrID string, sd SkipDrain, force bool, ...) error
- func (c Client) CleanUp(all bool) error
- func (c Client) CleanUpSSH(deploymentName, jobName, indexOrID string, opts SSHOpts) error
- func (c Client) CloudConfigs() ([]CloudConfig, error)
- func (c Client) CurrentTasks(filter TasksFilter) ([]TaskResp, error)
- func (c Client) DeleteDeployment(deploymentName string, force bool) error
- func (c Client) DeleteOrphanedDisk(cid string) error
- func (c Client) DeleteReleaseOrSeries(name, version string, force bool) error
- func (c Client) DeleteSnapshot(deploymentName, cid string) error
- func (c Client) DeleteSnapshots(deploymentName string) error
- func (c Client) DeleteStemcell(name, version string, force bool) error
- func (c Client) DeleteVM(cid string) error
- func (c Client) Deployment(name string) (DeploymentResp, error)
- func (c Client) DeploymentInstanceInfos(deploymentName string) ([]VMInfo, error)
- func (c Client) DeploymentVMInfos(deploymentName string) ([]VMInfo, error)
- func (c Client) DeploymentVMs(deploymentName string) ([]DeploymentVMResp, error)
- func (c Client) Deployments() ([]DeploymentResp, error)
- func (c Client) Diff(manifest []byte, deploymentName string, doNotRedact bool) (DeploymentDiffResponse, error)
- func (c Client) DownloadResourceUnchecked(blobstoreID string, out io.Writer) error
- func (c Client) EnableResurrection(deploymentName, job, indexOrID string, enabled bool) error
- func (c Client) EnableResurrectionAll(enabled bool) error
- func (c Client) Errands(deploymentName string) ([]Errand, error)
- func (c Client) Events(opts EventsFilter) ([]EventResp, error)
- func (c Client) ExportRelease(deploymentName string, release ReleaseSlug, os OSVersionSlug) (ExportReleaseResp, error)
- func (c Client) FetchLogs(deploymentName, job, indexOrID string, filters []string, agent bool) (string, string, error)
- func (c Client) HasRelease(name, version string) (bool, error)
- func (c Client) HasStemcell(name, version string) (bool, error)
- func (c Client) Ignore(deploymentName, instanceGroup, indexOrID string, enabled bool) error
- func (c Client) Info() (InfoResp, error)
- func (c Client) ListProblems(deploymentName string) ([]Problem, error)
- func (c Client) Locks() ([]LockResp, error)
- func (c Client) MatchCompiledPackages(manifest interface{}) ([]string, error)
- func (c Client) MatchPackages(manifest interface{}) ([]string, error)
- func (c Client) OrphanedDisks() ([]OrphanedDiskResp, error)
- func (c Client) RecentTasks(limit int, filter TasksFilter) ([]TaskResp, error)
- func (c Client) Release(name, version string) (ReleaseResp, error)
- func (c Client) ReleaseSeries() ([]ReleaseSeriesResp, error)
- func (c Client) ResolveProblems(deploymentName string, answers []ProblemAnswer) error
- func (c Client) RunErrand(deploymentName, name string, keepAlive bool) (ErrandRunResp, error)
- func (c Client) RuntimeConfigs() ([]RuntimeConfig, error)
- func (c Client) ScanForProblems(deploymentName string) error
- func (c Client) SetUpSSH(deploymentName, jobName, indexOrID string, opts SSHOpts) ([]SSHResp, error)
- func (c Client) Snapshots(deploymentName string) ([]SnapshotResp, error)
- func (c Client) Stemcells() ([]StemcellResp, error)
- func (c Client) TakeSnapshot(deploymentName, job, indexOrID string) error
- func (c Client) TakeSnapshots(deploymentName string) error
- func (c Client) Task(id int) (TaskResp, error)
- func (c Client) TaskOutput(id int, type_ string, taskReporter TaskReporter) error
- func (c Client) UpdateCPIConfig(manifest []byte) error
- func (c Client) UpdateCloudConfig(manifest []byte) error
- func (c Client) UpdateDeployment(manifest []byte, opts UpdateOpts) error
- func (c Client) UpdateRuntimeConfig(manifest []byte) error
- func (c Client) UploadReleaseFile(file UploadFile, rebase, fix bool) error
- func (c Client) UploadReleaseURL(url, sha1 string, rebase, fix bool) error
- func (c Client) UploadStemcellFile(file UploadFile, fix bool) error
- func (c Client) UploadStemcellURL(url, sha1 string, fix bool) error
- func (c Client) VMs() ([]VMResp, error)
- type ClientRequest
- func (r ClientRequest) Delete(path string, response interface{}) error
- func (r ClientRequest) Get(path string, response interface{}) error
- func (r ClientRequest) Post(path string, payload []byte, f func(*http.Request), response interface{}) error
- func (r ClientRequest) Put(path string, payload []byte, f func(*http.Request), response interface{}) error
- func (r ClientRequest) RawDelete(path string) ([]byte, *http.Response, error)
- func (r ClientRequest) RawGet(path string, out io.Writer, f func(*http.Request)) ([]byte, *http.Response, error)
- func (r ClientRequest) RawPost(path string, payload []byte, f func(*http.Request)) ([]byte, *http.Response, error)
- func (r ClientRequest) RawPut(path string, payload []byte, f func(*http.Request)) ([]byte, *http.Response, error)
- type CloudConfig
- type CompiledPackage
- type Config
- type Deployment
- type DeploymentDiff
- type DeploymentDiffResponse
- type DeploymentImpl
- func (d DeploymentImpl) AttachDisk(slug InstanceSlug, diskCID string) error
- func (d DeploymentImpl) CleanUpSSH(slug AllOrInstanceGroupOrInstanceSlug, opts SSHOpts) error
- func (d *DeploymentImpl) CloudConfig() (string, error)
- func (d DeploymentImpl) Delete(force bool) error
- func (d DeploymentImpl) DeleteSnapshot(cid string) error
- func (d DeploymentImpl) DeleteSnapshots() error
- func (d DeploymentImpl) DeleteVM(cid string) error
- func (d DeploymentImpl) Diff(manifest []byte, doNotRedact bool) (DeploymentDiff, error)
- func (d DeploymentImpl) EnableResurrection(slug InstanceSlug, enabled bool) error
- func (d DeploymentImpl) Errands() ([]Errand, error)
- func (d DeploymentImpl) ExportRelease(release ReleaseSlug, os OSVersionSlug) (ExportReleaseResult, error)
- func (d DeploymentImpl) FetchLogs(slug InstanceSlug, filters []string, agent bool) (LogsResult, error)
- func (d DeploymentImpl) Ignore(slug InstanceSlug, enabled bool) error
- func (d DeploymentImpl) InstanceInfos() ([]VMInfo, error)
- func (d DeploymentImpl) IsInProgress() (bool, error)
- func (d DeploymentImpl) Manifest() (string, error)
- func (d DeploymentImpl) Name() string
- func (d DeploymentImpl) Recreate(slug AllOrInstanceGroupOrInstanceSlug, opts RecreateOpts) error
- func (d *DeploymentImpl) Releases() ([]Release, error)
- func (d DeploymentImpl) ResolveProblems(answers []ProblemAnswer) error
- func (d DeploymentImpl) Restart(slug AllOrInstanceGroupOrInstanceSlug, opts RestartOpts) error
- func (d DeploymentImpl) RunErrand(name string, keepAlive bool) (ErrandResult, error)
- func (d DeploymentImpl) ScanForProblems() ([]Problem, error)
- func (d DeploymentImpl) SetUpSSH(slug AllOrInstanceGroupOrInstanceSlug, opts SSHOpts) (SSHResult, error)
- func (d DeploymentImpl) Snapshots() ([]Snapshot, error)
- func (d DeploymentImpl) Start(slug AllOrInstanceGroupOrInstanceSlug, opts StartOpts) error
- func (d *DeploymentImpl) Stemcells() ([]Stemcell, error)
- func (d DeploymentImpl) Stop(slug AllOrInstanceGroupOrInstanceSlug, opts StopOpts) error
- func (d DeploymentImpl) TakeSnapshot(slug InstanceSlug) error
- func (d DeploymentImpl) TakeSnapshots() error
- func (d DeploymentImpl) Update(manifest []byte, opts UpdateOpts) error
- func (d DeploymentImpl) VMInfos() ([]VMInfo, error)
- type DeploymentReleaseResp
- type DeploymentResp
- type DeploymentStemcellResp
- type DeploymentVMResp
- type DiffLines
- type Director
- type DirectorImpl
- func (d DirectorImpl) CleanUp(all bool) error
- func (d DirectorImpl) CurrentTasks(filter TasksFilter) ([]Task, error)
- func (d DirectorImpl) Deployments() ([]Deployment, error)
- func (d DirectorImpl) DownloadResourceUnchecked(blobstoreID string, out io.Writer) error
- func (d DirectorImpl) EnableResurrection(enabled bool) error
- func (d DirectorImpl) Events(opts EventsFilter) ([]Event, error)
- func (d DirectorImpl) FindDeployment(name string) (Deployment, error)
- func (d DirectorImpl) FindOrphanedDisk(cid string) (OrphanedDisk, error)
- func (d DirectorImpl) FindRelease(slug ReleaseSlug) (Release, error)
- func (d DirectorImpl) FindReleaseSeries(slug ReleaseSeriesSlug) (ReleaseSeries, error)
- func (d DirectorImpl) FindStemcell(slug StemcellSlug) (Stemcell, error)
- func (d DirectorImpl) FindTask(id int) (Task, error)
- func (d DirectorImpl) HasRelease(name, version string) (bool, error)
- func (d DirectorImpl) HasStemcell(name, version string) (bool, error)
- func (d DirectorImpl) Info() (Info, error)
- func (d DirectorImpl) IsAuthenticated() (bool, error)
- func (d DirectorImpl) LatestCPIConfig() (CPIConfig, error)
- func (d DirectorImpl) LatestCloudConfig() (CloudConfig, error)
- func (d DirectorImpl) LatestRuntimeConfig() (RuntimeConfig, error)
- func (d DirectorImpl) Locks() ([]Lock, error)
- func (d DirectorImpl) MatchPackages(manifest interface{}, compiled bool) ([]string, error)
- func (d DirectorImpl) OrphanedDisks() ([]OrphanedDisk, error)
- func (d DirectorImpl) RecentTasks(limit int, filter TasksFilter) ([]Task, error)
- func (d DirectorImpl) Releases() ([]Release, error)
- func (d DirectorImpl) Stemcells() ([]Stemcell, error)
- func (d DirectorImpl) UpdateCPIConfig(manifest []byte) error
- func (d DirectorImpl) UpdateCloudConfig(manifest []byte) error
- func (d DirectorImpl) UpdateRuntimeConfig(manifest []byte) error
- func (d DirectorImpl) UploadReleaseFile(file UploadFile, rebase, fix bool) error
- func (d DirectorImpl) UploadReleaseURL(url, sha1 string, rebase, fix bool) error
- func (d DirectorImpl) UploadStemcellFile(file UploadFile, fix bool) error
- func (d DirectorImpl) UploadStemcellURL(url, sha1 string, fix bool) error
- type Errand
- type ErrandResult
- type ErrandRunResp
- type Event
- type EventImpl
- func (e EventImpl) Action() string
- func (e EventImpl) Context() map[string]interface{}
- func (e EventImpl) DeploymentName() string
- func (e EventImpl) Error() string
- func (e EventImpl) ID() string
- func (e EventImpl) Instance() string
- func (e EventImpl) ObjectName() string
- func (e EventImpl) ObjectType() string
- func (e EventImpl) ParentID() string
- func (e EventImpl) TaskID() string
- func (e EventImpl) Timestamp() time.Time
- func (e EventImpl) User() string
- type EventResp
- type EventsFilter
- type ExportReleaseResp
- type ExportReleaseResult
- type FSArchiveWithMetadata
- type Factory
- type FileReporter
- type Host
- type Info
- type InfoFeatureResp
- type InfoResp
- type InstanceGroupOrInstanceSlug
- type InstanceGroupSlug
- type InstanceSlug
- type Job
- type Link
- type Lock
- type LockResp
- type LogsResult
- type Manifest
- type ManifestRelease
- type NoopFileReporter
- type NoopTaskReporter
- type OSVersionSlug
- type OrphanedDisk
- type OrphanedDiskImpl
- func (d OrphanedDiskImpl) AZName() string
- func (d OrphanedDiskImpl) CID() string
- func (d OrphanedDiskImpl) Delete() error
- func (d OrphanedDiskImpl) Deployment() Deployment
- func (d OrphanedDiskImpl) InstanceName() string
- func (d OrphanedDiskImpl) OrphanedAt() time.Time
- func (d OrphanedDiskImpl) Size() uint64
- type OrphanedDiskResp
- type Package
- type Problem
- type ProblemAnswer
- type ProblemResolution
- type RecreateOpts
- type RedirectFunc
- type Release
- type ReleaseArchive
- type ReleaseImpl
- func (r ReleaseImpl) CommitHashWithMark(suffix string) string
- func (r ReleaseImpl) Delete(force bool) error
- func (r *ReleaseImpl) Jobs() ([]Job, error)
- func (r ReleaseImpl) Name() string
- func (r *ReleaseImpl) Packages() ([]Package, error)
- func (r ReleaseImpl) Version() semver.Version
- func (r ReleaseImpl) VersionMark(suffix string) string
- type ReleaseOrSeriesSlug
- type ReleaseResp
- type ReleaseSeries
- type ReleaseSeriesImpl
- type ReleaseSeriesResp
- type ReleaseSeriesSlug
- type ReleaseSlug
- type ReleaseVersionResp
- type RequestSanitizer
- type RestartOpts
- type RuntimeConfig
- type RuntimeConfigManifest
- type RuntimeConfigManifestRelease
- type SSHOpts
- type SSHResp
- type SSHResult
- type SkipDrain
- type Snapshot
- type SnapshotResp
- type StartOpts
- type Stemcell
- type StemcellArchive
- type StemcellImpl
- type StemcellResp
- type StemcellSlug
- type StopOpts
- type Task
- type TaskClientRequest
- func (r TaskClientRequest) DeleteResult(path string) ([]byte, error)
- func (r TaskClientRequest) GetResult(path string) (int, []byte, error)
- func (r TaskClientRequest) PostResult(path string, payload []byte, f func(*http.Request)) ([]byte, error)
- func (r TaskClientRequest) PutResult(path string, payload []byte, f func(*http.Request)) ([]byte, error)
- func (r TaskClientRequest) WaitForCompletion(id int, type_ string, taskReporter TaskReporter) error
- type TaskImpl
- func (t TaskImpl) CPIOutput(taskReporter TaskReporter) error
- func (t TaskImpl) Cancel() error
- func (t TaskImpl) DebugOutput(taskReporter TaskReporter) error
- func (t TaskImpl) DeploymentName() string
- func (t TaskImpl) Description() string
- func (t TaskImpl) EventOutput(taskReporter TaskReporter) error
- func (t TaskImpl) ID() int
- func (t TaskImpl) IsError() bool
- func (t TaskImpl) LastActivityAt() time.Time
- func (t TaskImpl) Result() string
- func (t TaskImpl) ResultOutput(taskReporter TaskReporter) error
- func (t TaskImpl) StartedAt() time.Time
- func (t TaskImpl) State() string
- func (t TaskImpl) User() string
- type TaskReporter
- type TaskResp
- type TasksFilter
- type TimeParser
- type TimeoutTime
- type UpdateOpts
- type UploadFile
- type UserAuthentication
- type UserAuthenticationResp
- type VMInfo
- type VMInfoProcess
- type VMInfoVitals
- type VMInfoVitalsCPU
- type VMInfoVitalsDiskSize
- type VMInfoVitalsMemIntSize
- type VMInfoVitalsMemSize
- type VMInfoVitalsUptime
- type VMResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjustableClient ¶
type AdjustableClient struct {
// contains filtered or unexported fields
}
func NewAdjustableClient ¶
func NewAdjustableClient(client AdjustedClient, adjustment Adjustment) AdjustableClient
type AdjustedClient ¶
type AdjustedClient interface {
Do(*http.Request) (*http.Response, error)
}
type Adjustment ¶
type Adjustment interface {
Adjust(req *http.Request, retried bool) error
NeedsReadjustment(*http.Response) bool
}
type AllOrInstanceGroupOrInstanceSlug ¶ added in v0.0.102
type AllOrInstanceGroupOrInstanceSlug struct {
// contains filtered or unexported fields
}
func NewAllOrInstanceGroupOrInstanceSlug ¶ added in v0.0.102
func NewAllOrInstanceGroupOrInstanceSlug(name, indexOrID string) AllOrInstanceGroupOrInstanceSlug
func NewAllOrInstanceGroupOrInstanceSlugFromString ¶ added in v0.0.102
func NewAllOrInstanceGroupOrInstanceSlugFromString(str string) (AllOrInstanceGroupOrInstanceSlug, error)
func (AllOrInstanceGroupOrInstanceSlug) IndexOrID ¶ added in v0.0.102
func (s AllOrInstanceGroupOrInstanceSlug) IndexOrID() string
func (AllOrInstanceGroupOrInstanceSlug) InstanceSlug ¶ added in v0.0.102
func (s AllOrInstanceGroupOrInstanceSlug) InstanceSlug() (InstanceSlug, bool)
func (AllOrInstanceGroupOrInstanceSlug) Name ¶ added in v0.0.102
func (s AllOrInstanceGroupOrInstanceSlug) Name() string
func (AllOrInstanceGroupOrInstanceSlug) String ¶ added in v0.0.102
func (s AllOrInstanceGroupOrInstanceSlug) String() string
func (*AllOrInstanceGroupOrInstanceSlug) UnmarshalFlag ¶ added in v0.0.102
func (s *AllOrInstanceGroupOrInstanceSlug) UnmarshalFlag(data string) error
type AuthRequestAdjustment ¶
type AuthRequestAdjustment struct {
// contains filtered or unexported fields
}
func NewAuthRequestAdjustment ¶
func NewAuthRequestAdjustment(
authFunc func(bool) (string, error),
username string,
password string,
) AuthRequestAdjustment
func (AuthRequestAdjustment) Adjust ¶
func (a AuthRequestAdjustment) Adjust(req *http.Request, retried bool) error
func (AuthRequestAdjustment) NeedsReadjustment ¶
func (a AuthRequestAdjustment) NeedsReadjustment(resp *http.Response) bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(
endpoint string,
httpClient boshhttp.HTTPClient,
taskReporter TaskReporter,
fileReporter FileReporter,
logger boshlog.Logger,
) Client
func (Client) CPIConfigs ¶ added in v0.0.105
func (c Client) CPIConfigs() ([]CPIConfig, error)
func (Client) CancelTask ¶
func (c Client) CancelTask(id int) error
func (Client) ChangeJobState ¶
func (c Client) ChangeJobState(state, deploymentName, job, indexOrID string, sd SkipDrain, force bool, fix bool, dryRun bool, canaries string, maxInFlight string) error
func (Client) CleanUpSSH ¶
func (c Client) CleanUpSSH(deploymentName, jobName, indexOrID string, opts SSHOpts) error
func (Client) CloudConfigs ¶
func (c Client) CloudConfigs() ([]CloudConfig, error)
func (Client) CurrentTasks ¶
func (c Client) CurrentTasks(filter TasksFilter) ([]TaskResp, error)
func (Client) DeleteDeployment ¶
func (c Client) DeleteDeployment(deploymentName string, force bool) error
func (Client) DeleteOrphanedDisk ¶
func (c Client) DeleteOrphanedDisk(cid string) error
func (Client) DeleteReleaseOrSeries ¶
func (c Client) DeleteReleaseOrSeries(name, version string, force bool) error
func (Client) DeleteSnapshot ¶
func (c Client) DeleteSnapshot(deploymentName, cid string) error
func (Client) DeleteSnapshots ¶
func (c Client) DeleteSnapshots(deploymentName string) error
func (Client) DeleteStemcell ¶
func (c Client) DeleteStemcell(name, version string, force bool) error
func (Client) Deployment ¶
func (c Client) Deployment(name string) (DeploymentResp, error)
func (Client) DeploymentInstanceInfos ¶
func (c Client) DeploymentInstanceInfos(deploymentName string) ([]VMInfo, error)
func (Client) DeploymentVMInfos ¶
func (c Client) DeploymentVMInfos(deploymentName string) ([]VMInfo, error)
func (Client) DeploymentVMs ¶
func (c Client) DeploymentVMs(deploymentName string) ([]DeploymentVMResp, error)
func (Client) Deployments ¶
func (c Client) Deployments() ([]DeploymentResp, error)
func (Client) Diff ¶
func (c Client) Diff(manifest []byte, deploymentName string, doNotRedact bool) (DeploymentDiffResponse, error)
func (Client) DownloadResourceUnchecked ¶
func (c Client) DownloadResourceUnchecked(blobstoreID string, out io.Writer) error
func (Client) EnableResurrection ¶
func (c Client) EnableResurrection(deploymentName, job, indexOrID string, enabled bool) error
func (Client) EnableResurrectionAll ¶
func (c Client) EnableResurrectionAll(enabled bool) error
func (Client) ExportRelease ¶
func (c Client) ExportRelease(deploymentName string, release ReleaseSlug, os OSVersionSlug) (ExportReleaseResp, error)
func (Client) FetchLogs ¶
func (c Client) FetchLogs(deploymentName, job, indexOrID string, filters []string, agent bool) (string, string, error)
func (Client) HasRelease ¶
func (c Client) HasRelease(name, version string) (bool, error)
func (Client) HasStemcell ¶
func (c Client) HasStemcell(name, version string) (bool, error)
func (Client) Ignore ¶ added in v0.0.101
func (c Client) Ignore(deploymentName, instanceGroup, indexOrID string, enabled bool) error
func (Client) ListProblems ¶
func (c Client) ListProblems(deploymentName string) ([]Problem, error)
func (Client) MatchCompiledPackages ¶
func (c Client) MatchCompiledPackages(manifest interface{}) ([]string, error)
func (Client) MatchPackages ¶
func (c Client) MatchPackages(manifest interface{}) ([]string, error)
func (Client) OrphanedDisks ¶
func (c Client) OrphanedDisks() ([]OrphanedDiskResp, error)
func (Client) RecentTasks ¶
func (c Client) RecentTasks(limit int, filter TasksFilter) ([]TaskResp, error)
func (Client) ReleaseSeries ¶
func (c Client) ReleaseSeries() ([]ReleaseSeriesResp, error)
func (Client) ResolveProblems ¶
func (c Client) ResolveProblems(deploymentName string, answers []ProblemAnswer) error
func (Client) RunErrand ¶
func (c Client) RunErrand(deploymentName, name string, keepAlive bool) (ErrandRunResp, error)
func (Client) RuntimeConfigs ¶
func (c Client) RuntimeConfigs() ([]RuntimeConfig, error)
func (Client) ScanForProblems ¶
func (c Client) ScanForProblems(deploymentName string) error
func (Client) SetUpSSH ¶
func (c Client) SetUpSSH(deploymentName, jobName, indexOrID string, opts SSHOpts) ([]SSHResp, error)
func (Client) TakeSnapshot ¶
func (c Client) TakeSnapshot(deploymentName, job, indexOrID string) error
func (Client) TakeSnapshots ¶
func (c Client) TakeSnapshots(deploymentName string) error
func (Client) TaskOutput ¶
func (c Client) TaskOutput(id int, type_ string, taskReporter TaskReporter) error
func (Client) UpdateCPIConfig ¶ added in v0.0.105
func (c Client) UpdateCPIConfig(manifest []byte) error
func (Client) UpdateCloudConfig ¶
func (c Client) UpdateCloudConfig(manifest []byte) error
func (Client) UpdateDeployment ¶
func (c Client) UpdateDeployment(manifest []byte, opts UpdateOpts) error
func (Client) UpdateRuntimeConfig ¶
func (c Client) UpdateRuntimeConfig(manifest []byte) error
func (Client) UploadReleaseFile ¶
func (c Client) UploadReleaseFile(file UploadFile, rebase, fix bool) error
func (Client) UploadReleaseURL ¶
func (c Client) UploadReleaseURL(url, sha1 string, rebase, fix bool) error
func (Client) UploadStemcellFile ¶
func (c Client) UploadStemcellFile(file UploadFile, fix bool) error
func (Client) UploadStemcellURL ¶
func (c Client) UploadStemcellURL(url, sha1 string, fix bool) error
type ClientRequest ¶
type ClientRequest struct {
// contains filtered or unexported fields
}
func NewClientRequest ¶
func NewClientRequest(
endpoint string,
httpClient boshhttp.HTTPClient,
fileReporter FileReporter,
logger boshlog.Logger,
) ClientRequest
func (ClientRequest) Delete ¶
func (r ClientRequest) Delete(path string, response interface{}) error
func (ClientRequest) Post ¶
func (r ClientRequest) Post(path string, payload []byte, f func(*http.Request), response interface{}) error
func (ClientRequest) Put ¶
func (r ClientRequest) Put(path string, payload []byte, f func(*http.Request), response interface{}) error
func (ClientRequest) RawDelete ¶
func (r ClientRequest) RawDelete(path string) ([]byte, *http.Response, error)
RawDelete follows redirects via GET unlike generic HTTP clients
func (ClientRequest) RawGet ¶
func (r ClientRequest) RawGet(path string, out io.Writer, f func(*http.Request)) ([]byte, *http.Response, error)
type CloudConfig ¶
type CloudConfig struct {
Properties string
}
type CompiledPackage ¶
type CompiledPackage struct {
// e.g. "bosh-aws-xen-hvm-ubuntu-trusty-go_agent/3093"
StemcellSlug StemcellSlug `json:"stemcell"`
BlobstoreID string `json:"blobstore_id"`
SHA1 string `json:"sha1"`
}
type Config ¶
type Config struct {
Host string
Port int
// CA certificate is not required
CACert string
Username string
Password string
TokenFunc func(bool) (string, error)
}
func NewConfigFromURL ¶
func NewConfigFromURL(url string) (Config, error)
func (Config) CACertPool ¶
func (c Config) CACertPool() (*x509.CertPool, error)
type Deployment ¶
type Deployment interface {
Name() string
Manifest() (string, error)
CloudConfig() (string, error)
Diff([]byte, bool) (DeploymentDiff, error)
Releases() ([]Release, error)
ExportRelease(ReleaseSlug, OSVersionSlug) (ExportReleaseResult, error)
Stemcells() ([]Stemcell, error)
VMInfos() ([]VMInfo, error)
InstanceInfos() ([]VMInfo, error)
Errands() ([]Errand, error)
RunErrand(string, bool) (ErrandResult, error)
ScanForProblems() ([]Problem, error)
ResolveProblems([]ProblemAnswer) error
Snapshots() ([]Snapshot, error)
TakeSnapshots() error
DeleteSnapshot(string) error
DeleteSnapshots() error
DeleteVM(string) error
// Deployment, pool or instance specifics
Start(slug AllOrInstanceGroupOrInstanceSlug, opts StartOpts) error
Stop(slug AllOrInstanceGroupOrInstanceSlug, opts StopOpts) error
Restart(slug AllOrInstanceGroupOrInstanceSlug, opts RestartOpts) error
Recreate(slug AllOrInstanceGroupOrInstanceSlug, opts RecreateOpts) error
SetUpSSH(AllOrInstanceGroupOrInstanceSlug, SSHOpts) (SSHResult, error)
CleanUpSSH(AllOrInstanceGroupOrInstanceSlug, SSHOpts) error
// Instance specifics
FetchLogs(InstanceSlug, []string, bool) (LogsResult, error)
TakeSnapshot(InstanceSlug) error
Ignore(InstanceSlug, bool) error
EnableResurrection(InstanceSlug, bool) error
Update(manifest []byte, opts UpdateOpts) error
Delete(force bool) error
AttachDisk(slug InstanceSlug, diskCID string) error
}
type DeploymentDiff ¶ added in v0.0.98
type DeploymentDiff struct {
Diff [][]interface{}
// contains filtered or unexported fields
}
func NewDeploymentDiff ¶ added in v0.0.98
func NewDeploymentDiff(diff [][]interface{}, context map[string]interface{}) DeploymentDiff
type DeploymentDiffResponse ¶
type DeploymentDiffResponse struct {
Context map[string]interface{} `json:"context"`
Diff [][]interface{} `json:"diff"`
}
type DeploymentImpl ¶
type DeploymentImpl struct {
// contains filtered or unexported fields
}
func (DeploymentImpl) AttachDisk ¶ added in v0.0.105
func (d DeploymentImpl) AttachDisk(slug InstanceSlug, diskCID string) error
func (DeploymentImpl) CleanUpSSH ¶
func (d DeploymentImpl) CleanUpSSH(slug AllOrInstanceGroupOrInstanceSlug, opts SSHOpts) error
func (*DeploymentImpl) CloudConfig ¶
func (d *DeploymentImpl) CloudConfig() (string, error)
func (DeploymentImpl) DeleteSnapshot ¶
func (d DeploymentImpl) DeleteSnapshot(cid string) error
func (DeploymentImpl) DeleteSnapshots ¶
func (d DeploymentImpl) DeleteSnapshots() error
func (DeploymentImpl) DeleteVM ¶ added in v0.0.95
func (d DeploymentImpl) DeleteVM(cid string) error
func (DeploymentImpl) Diff ¶
func (d DeploymentImpl) Diff(manifest []byte, doNotRedact bool) (DeploymentDiff, error)
func (DeploymentImpl) EnableResurrection ¶
func (d DeploymentImpl) EnableResurrection(slug InstanceSlug, enabled bool) error
func (DeploymentImpl) ExportRelease ¶
func (d DeploymentImpl) ExportRelease(release ReleaseSlug, os OSVersionSlug) (ExportReleaseResult, error)
func (DeploymentImpl) FetchLogs ¶
func (d DeploymentImpl) FetchLogs(slug InstanceSlug, filters []string, agent bool) (LogsResult, error)
func (DeploymentImpl) Ignore ¶ added in v0.0.101
func (d DeploymentImpl) Ignore(slug InstanceSlug, enabled bool) error
func (DeploymentImpl) InstanceInfos ¶
func (d DeploymentImpl) InstanceInfos() ([]VMInfo, error)
func (DeploymentImpl) IsInProgress ¶
func (d DeploymentImpl) IsInProgress() (bool, error)
func (DeploymentImpl) Recreate ¶
func (d DeploymentImpl) Recreate(slug AllOrInstanceGroupOrInstanceSlug, opts RecreateOpts) error
func (DeploymentImpl) ResolveProblems ¶
func (d DeploymentImpl) ResolveProblems(answers []ProblemAnswer) error
func (DeploymentImpl) Restart ¶
func (d DeploymentImpl) Restart(slug AllOrInstanceGroupOrInstanceSlug, opts RestartOpts) error
func (DeploymentImpl) RunErrand ¶
func (d DeploymentImpl) RunErrand(name string, keepAlive bool) (ErrandResult, error)
func (DeploymentImpl) ScanForProblems ¶
func (d DeploymentImpl) ScanForProblems() ([]Problem, error)
func (DeploymentImpl) SetUpSSH ¶
func (d DeploymentImpl) SetUpSSH(slug AllOrInstanceGroupOrInstanceSlug, opts SSHOpts) (SSHResult, error)
func (DeploymentImpl) Start ¶
func (d DeploymentImpl) Start(slug AllOrInstanceGroupOrInstanceSlug, opts StartOpts) error
func (DeploymentImpl) Stop ¶
func (d DeploymentImpl) Stop(slug AllOrInstanceGroupOrInstanceSlug, opts StopOpts) error
func (DeploymentImpl) TakeSnapshot ¶
func (d DeploymentImpl) TakeSnapshot(slug InstanceSlug) error
func (DeploymentImpl) TakeSnapshots ¶
func (d DeploymentImpl) TakeSnapshots() error
type DeploymentReleaseResp ¶
type DeploymentReleaseResp struct {
Name string
Version string
}
type DeploymentResp ¶
type DeploymentResp struct {
Name string
Manifest string
Releases []DeploymentReleaseResp
Stemcells []DeploymentStemcellResp
CloudConfig string `json:"cloud_config"`
}
type DeploymentStemcellResp ¶
type DeploymentStemcellResp struct {
Name string
Version string
}
type DeploymentVMResp ¶ added in v0.0.95
type DeploymentVMResp struct {
JobName string `json:"job"` // e.g. dummy1
JobIndex int `json:"index"` // e.g. 0,1,2
AgentID string `json:"agent_id"` // e.g. 3b30123e-dfa6-4eff-abe6-63c2d5a88938
CID string // e.g. vm-ce10ae6a-6c31-413b-a134-7179f49e0bda
}
type Director ¶
type Director interface {
IsAuthenticated() (bool, error)
Info() (Info, error)
Locks() ([]Lock, error)
CurrentTasks(TasksFilter) ([]Task, error)
RecentTasks(int, TasksFilter) ([]Task, error)
FindTask(int) (Task, error)
Events(EventsFilter) ([]Event, error)
Deployments() ([]Deployment, error)
FindDeployment(string) (Deployment, error)
Releases() ([]Release, error)
HasRelease(name, version string) (bool, error)
FindRelease(ReleaseSlug) (Release, error)
FindReleaseSeries(ReleaseSeriesSlug) (ReleaseSeries, error)
UploadReleaseURL(url, sha1 string, rebase, fix bool) error
UploadReleaseFile(file UploadFile, rebase, fix bool) error
MatchPackages(manifest interface{}, compiled bool) ([]string, error)
Stemcells() ([]Stemcell, error)
HasStemcell(name, version string) (bool, error)
FindStemcell(StemcellSlug) (Stemcell, error)
UploadStemcellURL(url, sha1 string, fix bool) error
UploadStemcellFile(file UploadFile, fix bool) error
LatestCloudConfig() (CloudConfig, error)
UpdateCloudConfig([]byte) error
LatestCPIConfig() (CPIConfig, error)
UpdateCPIConfig([]byte) error
LatestRuntimeConfig() (RuntimeConfig, error)
UpdateRuntimeConfig([]byte) error
FindOrphanedDisk(string) (OrphanedDisk, error)
OrphanedDisks() ([]OrphanedDisk, error)
EnableResurrection(bool) error
CleanUp(bool) error
DownloadResourceUnchecked(blobstoreID string, out io.Writer) error
}
type DirectorImpl ¶
type DirectorImpl struct {
// contains filtered or unexported fields
}
func (DirectorImpl) CurrentTasks ¶
func (d DirectorImpl) CurrentTasks(filter TasksFilter) ([]Task, error)
func (DirectorImpl) Deployments ¶
func (d DirectorImpl) Deployments() ([]Deployment, error)
func (DirectorImpl) DownloadResourceUnchecked ¶
func (d DirectorImpl) DownloadResourceUnchecked(blobstoreID string, out io.Writer) error
func (DirectorImpl) EnableResurrection ¶
func (d DirectorImpl) EnableResurrection(enabled bool) error
func (DirectorImpl) FindDeployment ¶
func (d DirectorImpl) FindDeployment(name string) (Deployment, error)
func (DirectorImpl) FindOrphanedDisk ¶
func (d DirectorImpl) FindOrphanedDisk(cid string) (OrphanedDisk, error)
func (DirectorImpl) FindRelease ¶
func (d DirectorImpl) FindRelease(slug ReleaseSlug) (Release, error)
func (DirectorImpl) FindReleaseSeries ¶
func (d DirectorImpl) FindReleaseSeries(slug ReleaseSeriesSlug) (ReleaseSeries, error)
func (DirectorImpl) FindStemcell ¶
func (d DirectorImpl) FindStemcell(slug StemcellSlug) (Stemcell, error)
func (DirectorImpl) HasRelease ¶
func (d DirectorImpl) HasRelease(name, version string) (bool, error)
func (DirectorImpl) HasStemcell ¶
func (d DirectorImpl) HasStemcell(name, version string) (bool, error)
func (DirectorImpl) IsAuthenticated ¶
func (d DirectorImpl) IsAuthenticated() (bool, error)
func (DirectorImpl) LatestCPIConfig ¶ added in v0.0.105
func (d DirectorImpl) LatestCPIConfig() (CPIConfig, error)
func (DirectorImpl) LatestCloudConfig ¶
func (d DirectorImpl) LatestCloudConfig() (CloudConfig, error)
func (DirectorImpl) LatestRuntimeConfig ¶
func (d DirectorImpl) LatestRuntimeConfig() (RuntimeConfig, error)
func (DirectorImpl) MatchPackages ¶
func (d DirectorImpl) MatchPackages(manifest interface{}, compiled bool) ([]string, error)
func (DirectorImpl) OrphanedDisks ¶
func (d DirectorImpl) OrphanedDisks() ([]OrphanedDisk, error)
func (DirectorImpl) RecentTasks ¶
func (d DirectorImpl) RecentTasks(limit int, filter TasksFilter) ([]Task, error)
func (DirectorImpl) UpdateCPIConfig ¶ added in v0.0.105
func (d DirectorImpl) UpdateCPIConfig(manifest []byte) error
func (DirectorImpl) UpdateCloudConfig ¶
func (d DirectorImpl) UpdateCloudConfig(manifest []byte) error
func (DirectorImpl) UpdateRuntimeConfig ¶
func (d DirectorImpl) UpdateRuntimeConfig(manifest []byte) error
func (DirectorImpl) UploadReleaseFile ¶
func (d DirectorImpl) UploadReleaseFile(file UploadFile, rebase, fix bool) error
func (DirectorImpl) UploadReleaseURL ¶
func (d DirectorImpl) UploadReleaseURL(url, sha1 string, rebase, fix bool) error
func (DirectorImpl) UploadStemcellFile ¶
func (d DirectorImpl) UploadStemcellFile(file UploadFile, fix bool) error
func (DirectorImpl) UploadStemcellURL ¶
func (d DirectorImpl) UploadStemcellURL(url, sha1 string, fix bool) error
type ErrandResult ¶
type ErrandResult struct {
ExitCode int
Stdout string
Stderr string
LogsBlobstoreID string
LogsSHA1 string
}
type ErrandRunResp ¶
type ErrandRunResp struct {
ExitCode int `json:"exit_code"`
Stdout string
Stderr string
Logs struct {
BlobstoreID string `json:"blobstore_id"`
SHA1 string `json:"sha1"`
} `json:"logs"`
}
type Event ¶
type Event interface {
ID() string
ParentID() string
Timestamp() time.Time
User() string
Action() string
ObjectType() string
ObjectName() string
TaskID() string
DeploymentName() string
Instance() string
Context() map[string]interface{}
Error() string
}
type EventImpl ¶
type EventImpl struct {
// contains filtered or unexported fields
}
func NewEventFromResp ¶
func NewEventFromResp(client Client, r EventResp) EventImpl
func (EventImpl) DeploymentName ¶
func (e EventImpl) DeploymentName() string
func (EventImpl) ObjectName ¶
func (e EventImpl) ObjectName() string
func (EventImpl) ObjectType ¶
func (e EventImpl) ObjectType() string
type EventResp ¶
type EventResp struct {
ID string `json:"id"`
Timestamp int64 `json:"timestamp"`
User string `json:"user"`
Action string `json:"action"`
ObjectType string `json:"object_type"`
ObjectName string `json:"object_name"`
TaskID string `json:"task"`
DeploymentName string `json:"deployment"`
Instance string `json:"instance"`
ParentID string `json:"parent_id,omitempty"`
Context map[string]interface{} `json:"context"`
Error string `json:"error"`
}
type EventsFilter ¶
type EventsFilter struct {
BeforeID string
Before string
After string
Deployment string
Task string
Instance string
}
type ExportReleaseResp ¶
type ExportReleaseResp struct {
BlobstoreID string `json:"blobstore_id"`
SHA1 string `json:"sha1"`
}
type ExportReleaseResult ¶
type ExportReleaseResult struct {
BlobstoreID string
SHA1 string
}
type FSArchiveWithMetadata ¶
type FSArchiveWithMetadata struct {
// contains filtered or unexported fields
}
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory(logger boshlog.Logger) Factory
type FileReporter ¶
type FileReporter interface {
TrackUpload(int64, io.ReadCloser) io.ReadCloser
TrackDownload(int64, io.Writer) io.Writer
}
type Host ¶
type Host struct {
Job string
IndexOrID string
Username string
Host string
HostPublicKey string
}
type Info ¶
type Info struct {
Name string
UUID string
Version string
User string
Auth UserAuthentication
Features map[string]bool
CPI string
}
type InfoFeatureResp ¶
type InfoFeatureResp struct {
Status bool
}
type InfoResp ¶
type InfoResp struct {
Name string // e.g. "Bosh Lite Director"
UUID string // e.g. "71d36859-4f21-446f-8a02-f18d7f1263c6"
Version string // e.g. "1.2922.0 (00000000)"
User string
Auth UserAuthenticationResp `json:"user_authentication"`
Features map[string]InfoFeatureResp
CPI string
}
type InstanceGroupOrInstanceSlug ¶ added in v0.0.102
type InstanceGroupOrInstanceSlug struct {
// contains filtered or unexported fields
}
func NewInstanceGroupOrInstanceSlug ¶ added in v0.0.102
func NewInstanceGroupOrInstanceSlug(name, indexOrID string) InstanceGroupOrInstanceSlug
func NewInstanceGroupOrInstanceSlugFromString ¶ added in v0.0.102
func NewInstanceGroupOrInstanceSlugFromString(str string) (InstanceGroupOrInstanceSlug, error)
func (InstanceGroupOrInstanceSlug) IndexOrID ¶ added in v0.0.102
func (s InstanceGroupOrInstanceSlug) IndexOrID() string
type InstanceGroupSlug ¶ added in v0.0.102
type InstanceGroupSlug struct {
// contains filtered or unexported fields
}
func NewInstanceGroupSlug ¶ added in v0.0.102
func NewInstanceGroupSlug(name string) InstanceGroupSlug
func (*InstanceGroupSlug) UnmarshalFlag ¶ added in v0.0.102
func (s *InstanceGroupSlug) UnmarshalFlag(data string) error
type InstanceSlug ¶
type InstanceSlug struct {
// contains filtered or unexported fields
}
func NewInstanceSlug ¶
func NewInstanceSlug(name, indexOrID string) InstanceSlug
func (InstanceSlug) IsProvided ¶
func (s InstanceSlug) IsProvided() bool
func (*InstanceSlug) UnmarshalFlag ¶
func (s *InstanceSlug) UnmarshalFlag(data string) error
type Job ¶
type Job struct {
Name string
Fingerprint string
BlobstoreID string `json:"blobstore_id"`
SHA1 string `json:"sha1"`
LinksConsumed []Link `json:"consumes"`
LinksProvided []Link `json:"provides"`
}
type Link ¶ added in v0.0.113
type Link struct {
Name string `json:"name"`
Type string `json:"type"`
Optional bool `json:"optional" yaml:",omitempty"`
}
type Lock ¶
type Lock struct {
Type string // e.g. "deployment"
Resource []string // e.g. ["some-deployment-name"]
ExpiresAt time.Time
}
type LockResp ¶
type LockResp struct {
Type string // e.g. "deployment"
Resource []string // e.g. ["some-deployment-name"]
Timeout string // e.g. "1443889622.9964118"
}
func (LockResp) IsForDeployment ¶
func (l LockResp) IsForDeployment(name string) bool
type LogsResult ¶
type LogsResult struct {
BlobstoreID string
SHA1 string
}
type Manifest ¶
type Manifest struct {
Name string
Releases []ManifestRelease
}
func NewManifestFromBytes ¶
func NewManifestFromBytes(bytes []byte) (Manifest, error)
func NewManifestFromPath ¶
func NewManifestFromPath(path string, fs boshsys.FileSystem) (Manifest, error)
type ManifestRelease ¶
type ManifestRelease struct {
Name string
Version string
URL string
SHA1 string
}
type NoopFileReporter ¶
type NoopFileReporter struct{}
func NewNoopFileReporter ¶
func NewNoopFileReporter() NoopFileReporter
func (NoopFileReporter) TrackDownload ¶
func (r NoopFileReporter) TrackDownload(size int64, writer io.Writer) io.Writer
func (NoopFileReporter) TrackUpload ¶
func (r NoopFileReporter) TrackUpload(size int64, reader io.ReadCloser) io.ReadCloser
type NoopTaskReporter ¶
type NoopTaskReporter struct{}
func NewNoopTaskReporter ¶
func NewNoopTaskReporter() NoopTaskReporter
func (NoopTaskReporter) TaskFinished ¶
func (r NoopTaskReporter) TaskFinished(id int, state string)
func (NoopTaskReporter) TaskOutputChunk ¶
func (r NoopTaskReporter) TaskOutputChunk(id int, chunk []byte)
func (NoopTaskReporter) TaskStarted ¶
func (r NoopTaskReporter) TaskStarted(id int)
type OSVersionSlug ¶
type OSVersionSlug struct {
// contains filtered or unexported fields
}
func NewOSVersionSlug ¶
func NewOSVersionSlug(os, version string) OSVersionSlug
func (*OSVersionSlug) UnmarshalFlag ¶
func (s *OSVersionSlug) UnmarshalFlag(data string) error
type OrphanedDisk ¶
type OrphanedDisk interface {
CID() string
Size() uint64
Deployment() Deployment
InstanceName() string
AZName() string
OrphanedAt() time.Time
Delete() error
}
type OrphanedDiskImpl ¶
type OrphanedDiskImpl struct {
// contains filtered or unexported fields
}
func (OrphanedDiskImpl) Deployment ¶
func (d OrphanedDiskImpl) Deployment() Deployment
func (OrphanedDiskImpl) InstanceName ¶
func (d OrphanedDiskImpl) InstanceName() string
func (OrphanedDiskImpl) OrphanedAt ¶
func (d OrphanedDiskImpl) OrphanedAt() time.Time
type OrphanedDiskResp ¶
type OrphanedDiskResp struct {
CID string `json:"disk_cid"`
Size uint64
DeploymentName string `json:"deployment_name"`
InstanceName string `json:"instance_name"`
AZ string `json:"az"`
OrphanedAt string `json:"orphaned_at"` // e.g. "2016-01-09 06:23:25 +0000"
}
type Package ¶
type Package struct {
Name string
Fingerprint string
BlobstoreID string `json:"blobstore_id"`
SHA1 string `json:"sha1"`
CompiledPackages []CompiledPackage `json:"compiled_packages"`
}
type Problem ¶
type Problem struct {
ID int // e.g. 4
Type string // e.g. "unresponsive_agent"
Description string // e.g. "api/1 (5efd2cb8-d73b-4e45-6df4-58f5dd5ec2ec) is not responding"
Data interface{}
Resolutions []ProblemResolution
}
type ProblemAnswer ¶
type ProblemAnswer struct {
ProblemID int
Resolution ProblemResolution
}
type ProblemResolution ¶
type ProblemResolution struct {
Name *string `json:"name"` // e.g. "Skip for now", "Recreate VM"
Plan string `json:"plan"` // e.g. "ignore", "reboot_vm"
}
var ProblemResolutionDefault ProblemResolution = ProblemResolution{}
type RecreateOpts ¶ added in v0.0.98
type RecreateOpts struct {
Canaries string
MaxInFlight string
Force bool
Fix bool
SkipDrain SkipDrain
DryRun bool
}
type RedirectFunc ¶
type RedirectFunc func(*http.Request, []*http.Request) error
type Release ¶
type Release interface {
Name() string
Version() semver.Version
VersionMark(mark string) string
CommitHashWithMark(mark string) string
Jobs() ([]Job, error)
Packages() ([]Package, error)
Delete(force bool) error
}
type ReleaseArchive ¶
type ReleaseArchive interface {
Info() (string, string, error)
File() (UploadFile, error)
}
func NewFSReleaseArchive ¶
func NewFSReleaseArchive(path string, fs boshsys.FileSystem) ReleaseArchive
func NewFSStemcellArchive ¶
func NewFSStemcellArchive(path string, fs boshsys.FileSystem) ReleaseArchive
type ReleaseImpl ¶
type ReleaseImpl struct {
// contains filtered or unexported fields
}
func (ReleaseImpl) CommitHashWithMark ¶
func (r ReleaseImpl) CommitHashWithMark(suffix string) string
func (ReleaseImpl) VersionMark ¶
func (r ReleaseImpl) VersionMark(suffix string) string
type ReleaseOrSeriesSlug ¶
type ReleaseOrSeriesSlug struct {
// contains filtered or unexported fields
}
func NewReleaseOrSeriesSlug ¶
func NewReleaseOrSeriesSlug(name, version string) ReleaseOrSeriesSlug
func (ReleaseOrSeriesSlug) ReleaseSlug ¶
func (s ReleaseOrSeriesSlug) ReleaseSlug() (ReleaseSlug, bool)
func (ReleaseOrSeriesSlug) SeriesSlug ¶
func (s ReleaseOrSeriesSlug) SeriesSlug() ReleaseSeriesSlug
func (*ReleaseOrSeriesSlug) UnmarshalFlag ¶
func (s *ReleaseOrSeriesSlug) UnmarshalFlag(data string) error
type ReleaseResp ¶
type ReleaseResp struct {
Jobs []Job
Packages []Package
}
type ReleaseSeries ¶
type ReleaseSeries interface {
Name() string
Delete(force bool) error
}
type ReleaseSeriesImpl ¶
type ReleaseSeriesImpl struct {
// contains filtered or unexported fields
}
type ReleaseSeriesResp ¶
type ReleaseSeriesResp struct {
Name string
Versions []ReleaseVersionResp `json:"release_versions"`
}
type ReleaseSeriesSlug ¶
type ReleaseSeriesSlug struct {
// contains filtered or unexported fields
}
func NewReleaseSeriesSlug ¶
func NewReleaseSeriesSlug(name string) ReleaseSeriesSlug
func (*ReleaseSeriesSlug) UnmarshalFlag ¶
func (s *ReleaseSeriesSlug) UnmarshalFlag(data string) error
type ReleaseSlug ¶
type ReleaseSlug struct {
// contains filtered or unexported fields
}
func NewReleaseSlug ¶
func NewReleaseSlug(name, version string) ReleaseSlug
func (*ReleaseSlug) UnmarshalFlag ¶
func (s *ReleaseSlug) UnmarshalFlag(data string) error
type ReleaseVersionResp ¶
type ReleaseVersionResp struct {
Version string
CurrentlyDeployed bool `json:"currently_deployed"`
CommitHash string `json:"commit_hash"`
UncommittedChanges bool `json:"uncommitted_changes"`
}
type RequestSanitizer ¶
type RequestSanitizer struct {
Request http.Request
}
func (RequestSanitizer) SanitizeRequest ¶
func (rs RequestSanitizer) SanitizeRequest() (http.Request, error)
This will destructively mutate rs.Request
type RestartOpts ¶ added in v0.0.98
type RestartOpts struct {
Canaries string
MaxInFlight string
Force bool
SkipDrain SkipDrain
}
type RuntimeConfig ¶
type RuntimeConfig struct {
Properties string
}
type RuntimeConfigManifest ¶
type RuntimeConfigManifest struct {
Releases []RuntimeConfigManifestRelease
}
func NewRuntimeConfigManifestFromBytes ¶
func NewRuntimeConfigManifestFromBytes(bytes []byte) (RuntimeConfigManifest, error)
type RuntimeConfigManifestRelease ¶
type RuntimeConfigManifestRelease struct {
Name string
Version string
URL string
SHA1 string
}
type SSHOpts ¶
type SSHOpts struct {
Username string
Password string
PublicKey string
}
func NewSSHOpts ¶
func NewSSHOpts(uuidGen boshuuid.Generator) (SSHOpts, string, error)
type SSHResp ¶
type SSHResp struct {
Status string
Job string
Index *int
ID string
IP string // e.g. "10.244.2.18"
HostPublicKey string `json:"host_public_key"`
GatewayUser string `json:"gateway_user"`
GatewayHost string `json:"gateway_host"`
}
type SkipDrain ¶
type SkipDrain struct {
All bool
Slugs []InstanceGroupOrInstanceSlug
}
func (SkipDrain) AsQueryValue ¶
func (s SkipDrain) AsQueryValue() string
func (*SkipDrain) UnmarshalFlag ¶
func (s *SkipDrain) UnmarshalFlag(data string) error
type Snapshot ¶
type Snapshot struct {
Job string
Index *int
CID string
CreatedAt time.Time
Clean bool
}
func (Snapshot) InstanceDesc ¶
func (s Snapshot) InstanceDesc() string
type SnapshotResp ¶
type SnapshotResp struct {
Job string
Index *int
SnapshotCID string `json:"snapshot_cid"`
CreatedAt string `json:"created_at"`
Clean bool
}
type Stemcell ¶
type Stemcell interface {
Name() string
Version() semver.Version
VersionMark(mark string) string
OSName() string
CPI() string
CID() string
Delete(force bool) error
}
type StemcellArchive ¶
type StemcellArchive interface {
Info() (string, string, error)
File() (UploadFile, error)
}
func NewFSArchiveWithMetadata ¶
func NewFSArchiveWithMetadata(path, fileName string, fs boshsys.FileSystem) StemcellArchive
type StemcellImpl ¶
type StemcellImpl struct {
// contains filtered or unexported fields
}
func (StemcellImpl) VersionMark ¶
func (s StemcellImpl) VersionMark(suffix string) string
type StemcellResp ¶
type StemcellResp struct {
Name string
Version string
OperatingSystem string `json:"operating_system"`
CID string `json:"cid"`
CPI string `json:"cpi"`
// Only used for determining if stemcell is deployed
Deployments []interface{}
}
type StemcellSlug ¶
type StemcellSlug struct {
// contains filtered or unexported fields
}
func NewStemcellSlug ¶
func NewStemcellSlug(name, version string) StemcellSlug
func (*StemcellSlug) UnmarshalFlag ¶
func (s *StemcellSlug) UnmarshalFlag(data string) error
func (*StemcellSlug) UnmarshalJSON ¶
func (s *StemcellSlug) UnmarshalJSON(data []byte) error
type StopOpts ¶ added in v0.0.98
type StopOpts struct {
Canaries string
MaxInFlight string
Force bool
SkipDrain SkipDrain
Hard bool
}
type Task ¶
type Task interface {
ID() int
StartedAt() time.Time
LastActivityAt() time.Time
State() string
IsError() bool
User() string
DeploymentName() string
Description() string
Result() string
EventOutput(TaskReporter) error
CPIOutput(TaskReporter) error
DebugOutput(TaskReporter) error
ResultOutput(TaskReporter) error
Cancel() error
}
type TaskClientRequest ¶
type TaskClientRequest struct {
// contains filtered or unexported fields
}
func NewTaskClientRequest ¶
func NewTaskClientRequest(
clientRequest ClientRequest,
taskReporter TaskReporter,
taskCheckStepDuration time.Duration,
) TaskClientRequest
func (TaskClientRequest) DeleteResult ¶
func (r TaskClientRequest) DeleteResult(path string) ([]byte, error)
func (TaskClientRequest) GetResult ¶
func (r TaskClientRequest) GetResult(path string) (int, []byte, error)
func (TaskClientRequest) PostResult ¶
func (r TaskClientRequest) PostResult(path string, payload []byte, f func(*http.Request)) ([]byte, error)
func (TaskClientRequest) PutResult ¶
func (r TaskClientRequest) PutResult(path string, payload []byte, f func(*http.Request)) ([]byte, error)
func (TaskClientRequest) WaitForCompletion ¶
func (r TaskClientRequest) WaitForCompletion(id int, type_ string, taskReporter TaskReporter) error
type TaskImpl ¶
type TaskImpl struct {
// contains filtered or unexported fields
}
func NewTaskFromResp ¶
func NewTaskFromResp(client Client, r TaskResp) TaskImpl
func (TaskImpl) DebugOutput ¶
func (t TaskImpl) DebugOutput(taskReporter TaskReporter) error
func (TaskImpl) DeploymentName ¶
func (t TaskImpl) DeploymentName() string
func (TaskImpl) Description ¶
func (t TaskImpl) Description() string
func (TaskImpl) EventOutput ¶
func (t TaskImpl) EventOutput(taskReporter TaskReporter) error
func (TaskImpl) LastActivityAt ¶ added in v0.0.52
func (t TaskImpl) LastActivityAt() time.Time
func (TaskImpl) ResultOutput ¶
func (t TaskImpl) ResultOutput(taskReporter TaskReporter) error
type TaskReporter ¶
type TaskReporter interface {
TaskStarted(int)
TaskFinished(int, string)
TaskOutputChunk(int, []byte)
}
type TaskResp ¶
type TaskResp struct {
ID int // 165
StartedAt int64 `json:"started_at"` // 1440318199
LastActivityAt int64 `json:"timestamp"` // 1440318199
State string // e.g. "queued", "processing", "done", "error", "cancelled"
User string // e.g. "admin"
Deployment string
Description string // e.g. "create release"
Result string // e.g. "Created release `bosh-ui/0+dev.17'"
}
type TasksFilter ¶ added in v0.0.52
type TasksFilter struct {
All bool
Deployment string
}
type TimeParser ¶
type TimeParser struct{}
type TimeoutTime ¶
type TimeoutTime time.Time
type UpdateOpts ¶ added in v0.0.53
type UpdateOpts struct {
Recreate bool
Fix bool
SkipDrain SkipDrain
Canaries string
MaxInFlight string
DryRun bool
Diff DeploymentDiff
}
type UploadFile ¶
type UploadFile interface {
io.ReadCloser
Stat() (os.FileInfo, error)
}
type UserAuthentication ¶
type UserAuthentication struct {
Type string
Options map[string]interface{}
}
type UserAuthenticationResp ¶
type UserAuthenticationResp struct {
Type string
Options map[string]interface{}
}
type VMInfo ¶
type VMInfo struct {
AgentID string `json:"agent_id"`
JobName string `json:"job_name"`
ID string `json:"id"`
Index *int `json:"index"`
ProcessState string `json:"job_state"` // e.g. "running"
Bootstrap bool
IPs []string `json:"ips"`
DNS []string `json:"dns"`
AZ string `json:"az"`
State string `json:"state"`
VMID string `json:"vm_cid"`
VMType string `json:"vm_type"`
ResourcePool string `json:"resource_pool"`
DiskID string `json:"disk_cid"`
Ignore bool `json:"ignore"`
DiskIDs []string `json:"disk_cids"`
Processes []VMInfoProcess
Vitals VMInfoVitals
ResurrectionPaused bool `json:"resurrection_paused"`
}
type VMInfoProcess ¶
type VMInfoProcess struct {
Name string
State string // e.g. "running"
CPU VMInfoVitalsCPU `json:"cpu"`
Mem VMInfoVitalsMemIntSize
Uptime VMInfoVitalsUptime
}
type VMInfoVitals ¶
type VMInfoVitals struct {
CPU VMInfoVitalsCPU `json:"cpu"`
Mem VMInfoVitalsMemSize
Swap VMInfoVitalsMemSize
Uptime VMInfoVitalsUptime
Load []string
Disk map[string]VMInfoVitalsDiskSize
}
func (VMInfoVitals) EphemeralDisk ¶
func (v VMInfoVitals) EphemeralDisk() VMInfoVitalsDiskSize
func (VMInfoVitals) PersistentDisk ¶
func (v VMInfoVitals) PersistentDisk() VMInfoVitalsDiskSize
func (VMInfoVitals) SystemDisk ¶
func (v VMInfoVitals) SystemDisk() VMInfoVitalsDiskSize
type VMInfoVitalsCPU ¶
type VMInfoVitalsCPU struct {
Total *float64 // used by VMInfoProcess
Sys string
User string
Wait string
}
type VMInfoVitalsDiskSize ¶
type VMInfoVitalsDiskSize struct {
InodePercent string `json:"inode_percent"`
Percent string
}
type VMInfoVitalsMemIntSize ¶
type VMInfoVitalsMemIntSize struct {
KB *uint64 `json:"kb"`
Percent *float64
}
type VMInfoVitalsMemSize ¶
type VMInfoVitalsMemSize struct {
KB string `json:"kb"`
Percent string
}
type VMInfoVitalsUptime ¶
type VMInfoVitalsUptime struct {
Seconds *uint64 `json:"secs"` // e.g. 48307
}
Source Files
¶
- adjustable_client.go
- all_or_pool_or_instance_slug.go
- archive_with_metadata.go
- auth_request_adjustment.go
- client.go
- client_request.go
- cloud_configs.go
- cpi_configs.go
- deployment.go
- deployments.go
- diff.go
- director.go
- errands.go
- events.go
- factory.go
- factory_config.go
- info.go
- instance_slug.go
- instances.go
- interfaces.go
- locks.go
- manifest.go
- noop_reporters.go
- orphaned_disks.go
- os_version_slug.go
- packages.go
- pool_or_instance_slug.go
- pool_slug.go
- problems.go
- release_or_series_slug.go
- release_series.go
- release_series_slug.go
- release_slug.go
- releases.go
- request_sanitizer.go
- runtime_config_manifest.go
- runtime_configs.go
- skip_drain.go
- snapshots.go
- ssh.go
- ssh_opts.go
- stemcell_slug.go
- stemcells.go
- task_client_request.go
- tasks.go
- time_parser.go
- vm.go
- vms.go
Directories
¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.