From f76c769b8915bdfc2555b9a7b798d31ec32bbed2 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 11 Jun 2014 10:53:34 -0700 Subject: [PATCH] agent: Add reload to RPC clien --- command/agent/rpc_client.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/command/agent/rpc_client.go b/command/agent/rpc_client.go index e173ea99a6..9c35229629 100644 --- a/command/agent/rpc_client.go +++ b/command/agent/rpc_client.go @@ -197,6 +197,15 @@ func (c *RPCClient) Stats() (map[string]map[string]string, error) { 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 { client *RPCClient closed bool