Documentation ¶
Index ¶
- func NewAgentClient(endpoint string, directorID string, getTaskDelay time.Duration, ...) agentclient.AgentClient
- type AgentClient
- func (c *AgentClient) AddPersistentDisk(diskCID string, diskHints interface{}) error
- func (c *AgentClient) Apply(spec applyspec.ApplySpec) error
- func (c *AgentClient) BundleLogs(owningUser string, logType string, filters []string) (agentclient.BundleLogsResult, error)
- func (c *AgentClient) CleanUpSSH(user string) (agentclient.SSHResult, error)
- func (c *AgentClient) CompilePackage(packageSource agentclient.BlobRef, ...) (compiledPackageRef agentclient.BlobRef, err error)
- func (c *AgentClient) DeleteARPEntries(ips []string) error
- func (c *AgentClient) Drain(drainType string) (int64, error)
- func (c *AgentClient) GetState() (agentclient.AgentState, error)
- func (c *AgentClient) ListDisk() ([]string, error)
- func (c *AgentClient) MigrateDisk() error
- func (c *AgentClient) MountDisk(diskCID string) error
- func (c *AgentClient) Ping() (string, error)
- func (c *AgentClient) RemoveFile(path string) error
- func (c *AgentClient) RemovePersistentDisk(diskCID string) error
- func (c *AgentClient) RunScript(scriptName string, options map[string]interface{}) error
- func (c *AgentClient) SendAsyncTaskMessage(method string, arguments []interface{}) (value interface{}, err error)
- func (c *AgentClient) SetUpSSH(user string, publicKey string) (agentclient.SSHResult, error)
- func (c *AgentClient) Start() error
- func (c *AgentClient) Stop() error
- func (c *AgentClient) SyncDNS(blobID, sha1 string, version uint64) (string, error)
- func (c *AgentClient) UnmountDisk(diskCID string) error
- type AgentClientFactory
- type AgentRequestMessage
- type AgentState
- type BlobRef
- type BlobResponse
- type BundleLogsResponse
- type BundleLogsState
- type ListResponse
- type Response
- type SSHResponse
- type SSHState
- type SimpleTaskResponse
- type StateResponse
- type SyncDNSResponse
- type TaskResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentClient ¶
func NewAgentClient( endpoint string, directorID string, getTaskDelay time.Duration, toleratedErrorCount int, httpClient *httpclient.HTTPClient, logger boshlog.Logger, ) agentclient.AgentClient
Types ¶
type AgentClient ¶
type AgentClient struct { AgentRequest agentRequest // contains filtered or unexported fields }
func (*AgentClient) AddPersistentDisk ¶
func (c *AgentClient) AddPersistentDisk(diskCID string, diskHints interface{}) error
func (*AgentClient) BundleLogs ¶
func (c *AgentClient) BundleLogs(owningUser string, logType string, filters []string) (agentclient.BundleLogsResult, error)
func (*AgentClient) CleanUpSSH ¶
func (c *AgentClient) CleanUpSSH(user string) (agentclient.SSHResult, error)
func (*AgentClient) CompilePackage ¶
func (c *AgentClient) CompilePackage(packageSource agentclient.BlobRef, compiledPackageDependencies []agentclient.BlobRef) (compiledPackageRef agentclient.BlobRef, err error)
func (*AgentClient) DeleteARPEntries ¶
func (c *AgentClient) DeleteARPEntries(ips []string) error
func (*AgentClient) GetState ¶
func (c *AgentClient) GetState() (agentclient.AgentState, error)
func (*AgentClient) ListDisk ¶
func (c *AgentClient) ListDisk() ([]string, error)
func (*AgentClient) MigrateDisk ¶
func (c *AgentClient) MigrateDisk() error
func (*AgentClient) MountDisk ¶
func (c *AgentClient) MountDisk(diskCID string) error
func (*AgentClient) Ping ¶
func (c *AgentClient) Ping() (string, error)
func (*AgentClient) RemoveFile ¶
func (c *AgentClient) RemoveFile(path string) error
func (*AgentClient) RemovePersistentDisk ¶
func (c *AgentClient) RemovePersistentDisk(diskCID string) error
func (*AgentClient) RunScript ¶
func (c *AgentClient) RunScript(scriptName string, options map[string]interface{}) error
func (*AgentClient) SendAsyncTaskMessage ¶
func (c *AgentClient) SendAsyncTaskMessage(method string, arguments []interface{}) (value interface{}, err error)
func (*AgentClient) SetUpSSH ¶
func (c *AgentClient) SetUpSSH(user string, publicKey string) (agentclient.SSHResult, error)
func (*AgentClient) Start ¶
func (c *AgentClient) Start() error
func (*AgentClient) Stop ¶
func (c *AgentClient) Stop() error
func (*AgentClient) SyncDNS ¶
func (c *AgentClient) SyncDNS(blobID, sha1 string, version uint64) (string, error)
func (*AgentClient) UnmountDisk ¶
func (c *AgentClient) UnmountDisk(diskCID string) error
type AgentClientFactory ¶
type AgentClientFactory interface {
NewAgentClient(directorID, mbusURL, caCert string) (agentclient.AgentClient, error)
}
func NewAgentClientFactory ¶
func NewAgentClientFactory( getTaskDelay time.Duration, logger boshlog.Logger, ) AgentClientFactory
type AgentRequestMessage ¶
type AgentState ¶
type AgentState struct { JobState string `json:"job_state"` NetworkSpecs map[string]agentclient.NetworkSpec `json:"networks"` }
type BlobResponse ¶
func (*BlobResponse) ServerError ¶
func (r *BlobResponse) ServerError() error
func (*BlobResponse) Unmarshal ¶
func (r *BlobResponse) Unmarshal(message []byte) error
type BundleLogsResponse ¶
type BundleLogsResponse struct { Value BundleLogsState Exception *exception }
func (*BundleLogsResponse) ServerError ¶
func (r *BundleLogsResponse) ServerError() error
func (*BundleLogsResponse) Unmarshal ¶
func (r *BundleLogsResponse) Unmarshal(message []byte) error
type BundleLogsState ¶
type ListResponse ¶
type ListResponse struct { Value []string Exception *exception }
func (*ListResponse) ServerError ¶
func (r *ListResponse) ServerError() error
func (*ListResponse) Unmarshal ¶
func (r *ListResponse) Unmarshal(message []byte) error
type SSHResponse ¶
type SSHResponse struct { Value SSHState Exception *exception }
func (*SSHResponse) ServerError ¶
func (r *SSHResponse) ServerError() error
func (*SSHResponse) Unmarshal ¶
func (r *SSHResponse) Unmarshal(message []byte) error
type SimpleTaskResponse ¶
type SimpleTaskResponse struct { Value string Exception *exception }
func (*SimpleTaskResponse) ServerError ¶
func (r *SimpleTaskResponse) ServerError() error
func (*SimpleTaskResponse) Unmarshal ¶
func (r *SimpleTaskResponse) Unmarshal(message []byte) error
type StateResponse ¶
type StateResponse struct { Value AgentState Exception *exception }
func (*StateResponse) ServerError ¶
func (r *StateResponse) ServerError() error
func (*StateResponse) Unmarshal ¶
func (r *StateResponse) Unmarshal(message []byte) error
type SyncDNSResponse ¶
type SyncDNSResponse struct { Value string Exception *exception }
func (*SyncDNSResponse) ServerError ¶
func (r *SyncDNSResponse) ServerError() error
func (*SyncDNSResponse) Unmarshal ¶
func (r *SyncDNSResponse) Unmarshal(message []byte) error
type TaskResponse ¶
type TaskResponse struct { Value interface{} Exception *exception }
func (*TaskResponse) ServerError ¶
func (r *TaskResponse) ServerError() error
func (*TaskResponse) TaskID ¶
func (r *TaskResponse) TaskID() (string, error)
func (*TaskResponse) TaskState ¶
func (r *TaskResponse) TaskState() (string, error)
TaskState returns the state of the task reported by agent.
Agent response to get_task can be in different format based on task state. If task state is running agent responds with value as {value: { agent_task_id: "task-id", state: "running" }} Otherwise the value is a string like "stopped".
func (*TaskResponse) Unmarshal ¶
func (r *TaskResponse) Unmarshal(message []byte) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.