|
@@ -340,6 +340,19 @@ func request_Maintenance_Hash_0(ctx context.Context, marshaler runtime.Marshaler
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func request_Maintenance_HashKV_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
+ var protoReq etcdserverpb.HashKVRequest
|
|
|
|
|
+ var metadata runtime.ServerMetadata
|
|
|
|
|
+
|
|
|
|
|
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
|
|
|
|
+ return nil, metadata, grpc.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ msg, err := client.HashKV(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
+ return msg, metadata, err
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func request_Maintenance_Snapshot_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (etcdserverpb.Maintenance_SnapshotClient, runtime.ServerMetadata, error) {
|
|
func request_Maintenance_Snapshot_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (etcdserverpb.Maintenance_SnapshotClient, runtime.ServerMetadata, error) {
|
|
|
var protoReq etcdserverpb.SnapshotRequest
|
|
var protoReq etcdserverpb.SnapshotRequest
|
|
|
var metadata runtime.ServerMetadata
|
|
var metadata runtime.ServerMetadata
|
|
@@ -1320,6 +1333,34 @@ func RegisterMaintenanceHandler(ctx context.Context, mux *runtime.ServeMux, conn
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ mux.Handle("POST", pattern_Maintenance_HashKV_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
+ ctx, cancel := context.WithCancel(ctx)
|
|
|
|
|
+ defer cancel()
|
|
|
|
|
+ if cn, ok := w.(http.CloseNotifier); ok {
|
|
|
|
|
+ go func(done <-chan struct{}, closed <-chan bool) {
|
|
|
|
|
+ select {
|
|
|
|
|
+ case <-done:
|
|
|
|
|
+ case <-closed:
|
|
|
|
|
+ cancel()
|
|
|
|
|
+ }
|
|
|
|
|
+ }(ctx.Done(), cn.CloseNotify())
|
|
|
|
|
+ }
|
|
|
|
|
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
|
|
|
+ rctx, err := runtime.AnnotateContext(ctx, req)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ runtime.HTTPError(ctx, outboundMarshaler, w, req, err)
|
|
|
|
|
+ }
|
|
|
|
|
+ resp, md, err := request_Maintenance_HashKV_0(rctx, inboundMarshaler, client, req, pathParams)
|
|
|
|
|
+ ctx = runtime.NewServerMetadataContext(ctx, md)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ runtime.HTTPError(ctx, outboundMarshaler, w, req, err)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ forward_Maintenance_HashKV_0(ctx, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
mux.Handle("POST", pattern_Maintenance_Snapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
mux.Handle("POST", pattern_Maintenance_Snapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
ctx, cancel := context.WithCancel(ctx)
|
|
ctx, cancel := context.WithCancel(ctx)
|
|
|
defer cancel()
|
|
defer cancel()
|
|
@@ -1388,6 +1429,8 @@ var (
|
|
|
|
|
|
|
|
pattern_Maintenance_Hash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "hash"}, ""))
|
|
pattern_Maintenance_Hash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "hash"}, ""))
|
|
|
|
|
|
|
|
|
|
+ pattern_Maintenance_HashKV_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "hash"}, ""))
|
|
|
|
|
+
|
|
|
pattern_Maintenance_Snapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "snapshot"}, ""))
|
|
pattern_Maintenance_Snapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "snapshot"}, ""))
|
|
|
|
|
|
|
|
pattern_Maintenance_MoveLeader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "transfer-leadership"}, ""))
|
|
pattern_Maintenance_MoveLeader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "transfer-leadership"}, ""))
|
|
@@ -1402,6 +1445,8 @@ var (
|
|
|
|
|
|
|
|
forward_Maintenance_Hash_0 = runtime.ForwardResponseMessage
|
|
forward_Maintenance_Hash_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
+ forward_Maintenance_HashKV_0 = runtime.ForwardResponseMessage
|
|
|
|
|
+
|
|
|
forward_Maintenance_Snapshot_0 = runtime.ForwardResponseStream
|
|
forward_Maintenance_Snapshot_0 = runtime.ForwardResponseStream
|
|
|
|
|
|
|
|
forward_Maintenance_MoveLeader_0 = runtime.ForwardResponseMessage
|
|
forward_Maintenance_MoveLeader_0 = runtime.ForwardResponseMessage
|