mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
proxy/*: add 'MoveLeader' RPC
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
b1a0ae3a3e
commit
3e263d5a4d
@ -43,6 +43,10 @@ func (s *mts2mtc) Hash(ctx context.Context, r *pb.HashRequest, opts ...grpc.Call
|
||||
return s.mts.Hash(ctx, r)
|
||||
}
|
||||
|
||||
func (s *mts2mtc) MoveLeader(ctx context.Context, r *pb.MoveLeaderRequest, opts ...grpc.CallOption) (*pb.MoveLeaderResponse, error) {
|
||||
return s.mts.MoveLeader(ctx, r)
|
||||
}
|
||||
|
||||
func (s *mts2mtc) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (pb.Maintenance_SnapshotClient, error) {
|
||||
cs := newPipeStream(ctx, func(ss chanServerStream) error {
|
||||
return s.mts.Snapshot(in, &ss2scServerStream{ss})
|
||||
|
@ -72,3 +72,8 @@ func (mp *maintenanceProxy) Status(ctx context.Context, r *pb.StatusRequest) (*p
|
||||
conn := mp.client.ActiveConnection()
|
||||
return pb.NewMaintenanceClient(conn).Status(ctx, r)
|
||||
}
|
||||
|
||||
func (mp *maintenanceProxy) MoveLeader(ctx context.Context, r *pb.MoveLeaderRequest) (*pb.MoveLeaderResponse, error) {
|
||||
conn := mp.client.ActiveConnection()
|
||||
return pb.NewMaintenanceClient(conn).MoveLeader(ctx, r)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user