# Resign方法

Leader 方法用于放弃选举领导地位：

```java
// Resign　放弃选举领导地位，以便其他参选人可以在选举中获得领导地位。
rpc Resign(ResignRequest) returns (ResignResponse) {}
```

## 消息定义

请求的消息体是 `ResignRequest`：

```java
message ResignRequest {
  // leader 是要放弃的领导地位
  LeaderKey leader = 1;
}
```

应答的消息体是 `ResignResponse`：

```java
message ResignResponse {
  etcdserverpb.ResponseHeader header = 1;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doczhcn.gitbook.io/etcd/index-2/index-1/resign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
