agent: Add reload to RPC clien

This commit is contained in:
Armon Dadgar 2014-06-11 10:53:34 -07:00
parent 4f77db2d47
commit 074c238ce8
1 changed files with 9 additions and 0 deletions

View File

@ -197,6 +197,15 @@ func (c *RPCClient) Stats() (map[string]map[string]string, error) {
return resp, err return resp, err
} }
// Reload is used to trigger a configuration reload
func (c *RPCClient) Reload() error {
header := requestHeader{
Command: reloadCommand,
Seq: c.getSeq(),
}
return c.genericRPC(&header, nil, nil)
}
type monitorHandler struct { type monitorHandler struct {
client *RPCClient client *RPCClient
closed bool closed bool