2023-03-28 22:48:58 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 22:48:58 +00:00
|
|
|
|
2022-11-14 20:35:12 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package hashicorp.consul.internal.operator;
|
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
import "annotations/ratelimit/ratelimit.proto";
|
2023-01-04 16:07:02 +00:00
|
|
|
|
2022-11-14 20:35:12 +00:00
|
|
|
// Operator defines a set of operators operation applicable to Consul
|
|
|
|
service OperatorService {
|
|
|
|
//Transfer raft leadership to another node
|
2023-01-04 16:07:02 +00:00
|
|
|
rpc TransferLeader(TransferLeaderRequest) returns (TransferLeaderResponse) {
|
2023-03-20 15:24:29 +00:00
|
|
|
option (hashicorp.consul.internal.ratelimit.spec) = {
|
|
|
|
operation_type: OPERATION_TYPE_EXEMPT,
|
|
|
|
operation_category: OPERATION_CATEGORY_OPERATOR
|
|
|
|
};
|
2023-01-04 16:07:02 +00:00
|
|
|
}
|
2022-11-14 20:35:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message TransferLeaderRequest {
|
|
|
|
string ID = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// mog annotation:
|
|
|
|
//
|
|
|
|
// target=github.com/hashicorp/consul/api.TransferLeaderResponse
|
|
|
|
// output=operator.gen.go
|
|
|
|
// name=API
|
|
|
|
message TransferLeaderResponse {
|
|
|
|
// true if the transfer is a success
|
|
|
|
bool success = 1;
|
|
|
|
}
|