Skip to content

Commit

Permalink
add to client
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Feb 19, 2016
1 parent 8131845 commit a1022de
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client/system.go
Expand Up @@ -10,6 +10,14 @@ type System struct {
Version string `json:"version"`
}

type SystemCapacity struct {
ClusterMemory int64 `json:"cluster-memory"`
InstanceMemory int64 `json:"instance-memory"`
ProcessCount int64 `json:"process-count"`
ProcessMemory int64 `json:"process-memory"`
ProcessWidth int64 `json:"process-width"`
}

func (c *Client) GetSystem() (*System, error) {
var system System

Expand Down Expand Up @@ -49,6 +57,18 @@ func (c *Client) GetSystem() (*System, error) {
return &system, nil
}

func (c *Client) GetSystemCapacity() (*SystemCapacity, error) {
var capacity SystemCapacity

err := c.Get("/system/capacity", &capacity)

if err != nil {
return nil, err
}

return &capacity, nil
}

func (c *Client) GetSystemReleases() (Releases, error) {
var releases Releases

Expand Down

0 comments on commit a1022de

Please sign in to comment.