Help us shape the future of Go! Take the 2026 Go Developer Survey

http

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 15 Imported by: 129

Documentation

Index

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 AgentClientFactory

type AgentClientFactory interface {
	NewAgentClient(directorID, mbusURL string) agentclient.AgentClient
}

func NewAgentClientFactory

func NewAgentClientFactory(
	getTaskDelay time.Duration,
	logger boshlog.Logger,
) AgentClientFactory

type AgentRequestMessage

type AgentRequestMessage struct {
	Method    string        `json:"method"`
	Arguments []interface{} `json:"arguments"`
	ReplyTo   string        `json:"reply_to"`
}

type AgentState

type AgentState struct {
	JobState     string                             `json:"job_state"`
	NetworkSpecs map[string]agentclient.NetworkSpec `json:"networks"`
}

type BlobRef

type BlobRef struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	SHA1        string `json:"sha1"`
	BlobstoreID string `json:"blobstore_id"`
}

type BlobResponse

type BlobResponse struct {
	Value     map[string]string
	Exception *exception
}

func (*BlobResponse) ServerError

func (r *BlobResponse) ServerError() error

func (*BlobResponse) Unmarshal

func (r *BlobResponse) Unmarshal(message []byte) error

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 Response

type Response interface {
	Unmarshal([]byte) error
	ServerError() error
}

type SSHResponse added in v0.0.24

type SSHResponse struct {
	action.SSHResult
	Exception *exception
}

func (*SSHResponse) ServerError added in v0.0.24

func (r *SSHResponse) ServerError() error

func (*SSHResponse) Unmarshal added in v0.0.24

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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