Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentServer ¶
type AgentServer struct {
// contains filtered or unexported fields
}
AgentServer The type is the API for a serviced agent. Get the host information from an agent.
func NewServer ¶
func NewServer(staticIPs []string) *AgentServer
NewServer returns a new AgentServer
func (*AgentServer) BuildHost ¶
func (a *AgentServer) BuildHost(request BuildHostRequest, hostResponse *host.Host) error
BuildHost creates a Host object from the current host.
func (*AgentServer) GetDockerLogs ¶
func (a *AgentServer) GetDockerLogs(dockerID string, logs *string) error
GetDockerLogs returns the last 2000 lines of logs from the docker container
func (*AgentServer) PullImage ¶
func (a *AgentServer) PullImage(req PullImageRequest, image *string) error
PullImage pulls a registry image into the local repository. Returns the current image tag.
type BuildHostRequest ¶
type BuildHostRequest struct { IP string // IP for the host Port int // Port to contact the host on PoolID string // Pool to set on host Memory string // Memory allotted to this host }
BuildHostRequest request to build a new host. IP and IPResources will be validated to ensure they exist on the host. If IPResources is not set and IPResource using the IP parameter will be used
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client rpc client to interact with agent
func (*Client) BuildHost ¶
func (c *Client) BuildHost(request BuildHostRequest) (*host.Host, error)
BuildHost creates a Host object from the current host.
func (*Client) GetDockerLogs ¶
GetDockerLogs returns the last 10k worth of logs from the docker container