Add a status endpoint to the server.

This pull request adds a status endpoint to the Red October server; as
of this pull request, the status endpoint only returns the current
delegation persistence state. The HTTP UI has not been updated, as
this is scoped out for a future request; however, the CLI utility now
features a status command to fetch this information.
This commit is contained in:
Kyle Isom
2016-07-13 10:20:06 -07:00
parent 941cdb4e96
commit cb16b159f3
7 changed files with 174 additions and 16 deletions
+15
View File
@@ -372,3 +372,18 @@ func (c *RemoteServer) OrderCancel(req core.OrderInfoRequest) (*core.ResponseDat
return unmarshalResponseData(respBytes)
}
// Status returns the current delegation persistence state from the remote server.
func (c *RemoteServer) Status(req core.StatusRequest) (*core.ResponseData, error) {
reqBytes, err := json.Marshal(req)
if err != nil {
return nil, err
}
respBytes, err := c.doAction("status", reqBytes)
if err != nil {
return nil, err
}
return unmarshalResponseData(respBytes)
}