Add implementation for POST /config/reload apiV4 - Reload Configuration (#5713)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-03-14 13:52:27 +01:00
коммит произвёл Joram Wilander
родитель ee457176bd
Коммит d03367c560
3 изменённых файлов: 44 добавлений и 0 удалений

Просмотреть файл

@@ -1131,6 +1131,16 @@ func (c *Client4) GetConfig() (*Config, *Response) {
}
}
// ReloadConfig will reload the server configuration.
func (c *Client4) ReloadConfig() (bool, *Response) {
if r, err := c.DoApiPost(c.GetConfigRoute()+"/reload", ""); err != nil {
return false, &Response{StatusCode: r.StatusCode, Error: err}
} else {
defer closeBody(r)
return CheckStatusOK(r), BuildResponse(r)
}
}
func (c *Client4) DatabaseRecycle() (bool, *Response) {
if r, err := c.DoApiPost(c.GetDatabaseRoute()+"/recycle", ""); err != nil {
return false, &Response{StatusCode: r.StatusCode, Error: err}