Skip to content

Commit

Permalink
agent/node_endpoint use Node.DeregisterBatch
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Jun 13, 2019
1 parent 042103a commit 8537a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/agent/node_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ func (s *HTTPServer) nodePurge(resp http.ResponseWriter, req *http.Request, node
if req.Method != "PUT" && req.Method != "POST" {
return nil, CodedError(405, ErrInvalidMethod)
}
args := structs.NodeDeregisterRequest{
args := structs.NodeDeregisterBatchRequest{
NodeIDs: []string{nodeID},
}
s.parseWriteRequest(req, &args.WriteRequest)
var out structs.NodeUpdateResponse
if err := s.agent.RPC("Node.Deregister", &args, &out); err != nil {
if err := s.agent.RPC("Node.DeregisterBatch", &args, &out); err != nil {
return nil, err
}
setIndex(resp, out.Index)
Expand Down

0 comments on commit 8537a77

Please sign in to comment.