Ejemplo n.º 1
0
        /// <summary>
        /// RaftRemovePeerByAddress is used to kick a stale peer (one that it in the Raft
        /// quorum but no longer known to Serf or the catalog) by address in the form of
        /// "IP:port".
        /// </summary>
        public Task <WriteResult> RaftRemovePeerByAddress(string address, WriteOptions q, CancellationToken ct = default(CancellationToken))
        {
            var req = _client.Delete("/v1/operator/raft/peer", q);

            // From Consul repo:
            // TODO (slackpad) Currently we made address a query parameter. Once
            // IDs are in place this will be DELETE /v1/operator/raft/peer/<id>.
            req.Params["address"] = address;

            return(req.Execute(ct));
        }