Documentation ¶
Index ¶
- func NewAgentClient(endpoint string, directorID string, getTaskDelay time.Duration, ...) bmac.AgentClient
- func NewAgentRequest(endpoint string, httpClient bmhttpclient.HTTPClient, directorID string) agentRequest
- type AgentClientFactory
- type AgentRequestMessage
- type AgentState
- type ListResponse
- type Response
- type SimpleTaskResponse
- type StateResponse
- type TaskResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentClient ¶
func NewAgentClient( endpoint string, directorID string, getTaskDelay time.Duration, httpClient bmhttpclient.HTTPClient, logger boshlog.Logger, ) bmac.AgentClient
func NewAgentRequest ¶
func NewAgentRequest(endpoint string, httpClient bmhttpclient.HTTPClient, directorID string) agentRequest
Types ¶
type AgentClientFactory ¶
type AgentClientFactory interface {
NewAgentClient(directorID, mbusURL string) bmac.AgentClient
}
func NewAgentClientFactory ¶
func NewAgentClientFactory( getTaskDelay time.Duration, logger boshlog.Logger, ) AgentClientFactory
type AgentRequestMessage ¶
type AgentState ¶
type AgentState struct {
JobState string `json:"job_state"`
}
type ListResponse ¶
type ListResponse struct { Value []string Exception exceptionResponse }
func (*ListResponse) GetException ¶
func (r *ListResponse) GetException() exceptionResponse
func (*ListResponse) Unmarshal ¶
func (r *ListResponse) Unmarshal(message []byte) error
type SimpleTaskResponse ¶
type SimpleTaskResponse struct { Value string Exception exceptionResponse }
func (*SimpleTaskResponse) GetException ¶
func (r *SimpleTaskResponse) GetException() exceptionResponse
func (*SimpleTaskResponse) Unmarshal ¶
func (r *SimpleTaskResponse) Unmarshal(message []byte) error
type StateResponse ¶
type StateResponse struct { Value AgentState Exception exceptionResponse }
func (*StateResponse) GetException ¶
func (r *StateResponse) GetException() exceptionResponse
func (*StateResponse) Unmarshal ¶
func (r *StateResponse) Unmarshal(message []byte) error
type TaskResponse ¶
type TaskResponse struct { Value interface{} Exception exceptionResponse }
func (*TaskResponse) GetException ¶
func (r *TaskResponse) GetException() exceptionResponse
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 { 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.