diff --git a/Documentation/dev-guide/apispec/swagger/rpc.swagger.json b/Documentation/dev-guide/apispec/swagger/rpc.swagger.json index dd12cf315cc..bfe44808def 100644 --- a/Documentation/dev-guide/apispec/swagger/rpc.swagger.json +++ b/Documentation/dev-guide/apispec/swagger/rpc.swagger.json @@ -36,7 +36,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -69,7 +69,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -102,7 +102,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -135,7 +135,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -168,7 +168,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -201,7 +201,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -234,7 +234,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -267,7 +267,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -300,7 +300,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -333,7 +333,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -366,7 +366,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -399,7 +399,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -432,7 +432,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -465,7 +465,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -498,7 +498,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -531,7 +531,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -564,7 +564,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -597,7 +597,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -630,7 +630,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -663,7 +663,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -696,7 +696,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -729,7 +729,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -762,7 +762,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -795,7 +795,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -828,7 +828,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -861,7 +861,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -894,7 +894,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -927,7 +927,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -960,7 +960,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -993,7 +993,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1026,7 +1026,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1069,7 +1069,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1102,7 +1102,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1135,7 +1135,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1168,7 +1168,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1201,7 +1201,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1234,7 +1234,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1267,7 +1267,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1300,7 +1300,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1342,7 +1342,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1375,7 +1375,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1408,7 +1408,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1451,7 +1451,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -1567,8 +1567,7 @@ "type": "object", "properties": { "no_password": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -1779,8 +1778,7 @@ "title": "authRevision is the current revision of auth store" }, "enabled": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "header": { "$ref": "#/definitions/etcdserverpbResponseHeader" @@ -1962,8 +1960,7 @@ "properties": { "physical": { "description": "physical is set so the RPC will wait until the compaction is physically\napplied to the local database such that compacted entries are totally\nremoved from the backend database.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "revision": { "description": "revision is the key-value store revision for the compaction operation.", @@ -2049,8 +2046,7 @@ }, "prev_kv": { "description": "If prev_kv is set, etcd gets the previous key-value pairs before deleting it.\nThe previous key-value pairs will be returned in the delete response.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "range_end": { "description": "range_end is the key following the last key to delete for the range [key, range_end).\nIf range_end is not given, the range is defined to contain only the key argument.\nIf range_end is one bit larger than the given key, then the range is all the keys\nwith the prefix (the given key).\nIf range_end is '\\0', the range is all keys greater than or equal to the key argument.", @@ -2266,8 +2262,7 @@ }, "keys": { "description": "keys is true to query all the keys attached to this lease.", - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -2319,8 +2314,7 @@ }, "isLearner": { "description": "isLearner indicates if the member is raft learner.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "name": { "description": "name is the human-readable name of the member. If the member is not started, the name will be an empty string.", @@ -2340,8 +2334,7 @@ "properties": { "isLearner": { "description": "isLearner indicates if the added member is raft learner.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "peerURLs": { "description": "peerURLs is the list of URLs the added member will use to communicate with the cluster.", @@ -2375,8 +2368,7 @@ "type": "object", "properties": { "linearizable": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -2500,13 +2492,11 @@ "properties": { "ignore_lease": { "description": "If ignore_lease is set, etcd updates the key using its current lease.\nReturns an error if the key does not exist.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "ignore_value": { "description": "If ignore_value is set, etcd updates the key using its current value.\nReturns an error if the key does not exist.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "key": { "description": "key is the key, in bytes, to put into the key-value store.", @@ -2520,8 +2510,7 @@ }, "prev_kv": { "description": "If prev_kv is set, etcd gets the previous key-value pair before changing it.\nThe previous key-value pair will be returned in the put response.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "value": { "description": "value is the value, in bytes, to associate with the key in the key-value store.", @@ -2547,8 +2536,7 @@ "properties": { "count_only": { "description": "count_only when set returns only the count of the keys in the range.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "key": { "description": "key is the first key for the range. If range_end is not given, the request only looks up key.", @@ -2557,8 +2545,7 @@ }, "keys_only": { "description": "keys_only when set returns only the keys and not the values.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "limit": { "description": "limit is a limit on the number of keys returned for the request. When limit is set to 0,\nit is treated as no limit.", @@ -2597,8 +2584,7 @@ }, "serializable": { "description": "serializable sets the range request to use serializable member-local reads.\nRange requests are linearizable by default; linearizable requests have higher\nlatency and lower throughput than serializable requests but reflect the current\nconsensus of the cluster. For better performance, in exchange for possible stale reads,\na serializable range request is served locally without needing to reach consensus\nwith other nodes in the cluster.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "sort_order": { "description": "sort_order is the order for returned sorted results.", @@ -2630,8 +2616,7 @@ }, "more": { "description": "more indicates if there are more keys to return in the requested range.", - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -2671,7 +2656,7 @@ "format": "uint64" }, "revision": { - "description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number.", + "description": "revision is the key-value store revision when the request was applied, and it's\nunset (so 0) in case of calls not interacting with key-value store.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number.", "type": "string", "format": "int64" } @@ -2748,8 +2733,7 @@ }, "isLearner": { "description": "isLearner indicates if the member is raft learner.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "leader": { "description": "leader is the member ID which the responding member believes is the current leader.", @@ -2823,8 +2807,7 @@ }, "succeeded": { "description": "succeeded is set to true if the compare evaluated to true or false otherwise.", - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -2850,8 +2833,7 @@ }, "fragment": { "description": "fragment enables splitting large revisions into multiple watch responses.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "key": { "description": "key is the key to register for watching.", @@ -2860,13 +2842,11 @@ }, "prev_kv": { "description": "If prev_kv is set, created watcher gets the previous KV before the event happens.\nIf the previous KV is already compacted, nothing will be returned.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "progress_notify": { "description": "progress_notify is set so that the etcd server will periodically send a WatchResponse with\nno events to the new watcher if there are no recent events. It is useful when clients\nwish to recover a disconnected watcher starting from a recent known revision.\nThe etcd server may decide how often it will send notifications based on current load.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "range_end": { "description": "range_end is the end of the range [key, range_end) to watch. If range_end is not given,\nonly the key argument is watched. If range_end is equal to '\\0', all keys greater than\nor equal to the key argument are watched.\nIf the range_end is one bit larger than the given key,\nthen all keys with the prefix (the given key) will be watched.", @@ -2912,8 +2892,7 @@ }, "canceled": { "description": "canceled is set to true if the response is for a cancel watch request.\nNo further events will be sent to the canceled watcher.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "compact_revision": { "description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store.\n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again.", @@ -2922,8 +2901,7 @@ }, "created": { "description": "created is set to true if the response is for a create watch request.\nThe client should record the watch_id and expect to receive events for\nthe created watcher from the same stream.\nAll events sent to the created watcher will attach with the same watch_id.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "events": { "type": "array", @@ -2933,8 +2911,7 @@ }, "fragment": { "description": "framgment is true if large watch response was split over multiple responses.", - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "header": { "$ref": "#/definitions/etcdserverpbResponseHeader" diff --git a/Documentation/dev-guide/apispec/swagger/v3election.swagger.json b/Documentation/dev-guide/apispec/swagger/v3election.swagger.json index 8322e031222..7238a44e792 100644 --- a/Documentation/dev-guide/apispec/swagger/v3election.swagger.json +++ b/Documentation/dev-guide/apispec/swagger/v3election.swagger.json @@ -23,7 +23,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -56,7 +56,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -98,7 +98,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -131,7 +131,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -164,7 +164,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -203,7 +203,7 @@ "revision": { "type": "string", "format": "int64", - "description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number." + "description": "revision is the key-value store revision when the request was applied, and it's\nunset (so 0) in case of calls not interacting with key-value store.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number." }, "raft_term": { "type": "string", diff --git a/Documentation/dev-guide/apispec/swagger/v3lock.swagger.json b/Documentation/dev-guide/apispec/swagger/v3lock.swagger.json index aac2bf3ec69..5a45bdd9b2a 100644 --- a/Documentation/dev-guide/apispec/swagger/v3lock.swagger.json +++ b/Documentation/dev-guide/apispec/swagger/v3lock.swagger.json @@ -23,7 +23,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -56,7 +56,7 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/runtimeError" } @@ -95,7 +95,7 @@ "revision": { "type": "string", "format": "int64", - "description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number." + "description": "revision is the key-value store revision when the request was applied, and it's\nunset (so 0) in case of calls not interacting with key-value store.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number." }, "raft_term": { "type": "string", diff --git a/api/etcdserverpb/gw/rpc.pb.gw.go b/api/etcdserverpb/gw/rpc.pb.gw.go index 2fca126af85..042a4bee2bd 100644 --- a/api/etcdserverpb/gw/rpc.pb.gw.go +++ b/api/etcdserverpb/gw/rpc.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,6 +32,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_KV_Range_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq etcdserverpb.RangeRequest @@ -1558,11 +1560,14 @@ func local_request_Auth_RoleRevokePermission_0(ctx context.Context, marshaler ru // etcdserverpb.RegisterKVHandlerServer registers the http handlers for service KV to "mux". // UnaryRPC :call etcdserverpb.KVServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKVHandlerFromEndpoint instead. func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.KVServer) error { mux.Handle("POST", pattern_KV_Range_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1570,6 +1575,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_KV_Range_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1583,6 +1589,8 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server mux.Handle("POST", pattern_KV_Put_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1590,6 +1598,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_KV_Put_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1603,6 +1612,8 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server mux.Handle("POST", pattern_KV_DeleteRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1610,6 +1621,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_KV_DeleteRange_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1623,6 +1635,8 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server mux.Handle("POST", pattern_KV_Txn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1630,6 +1644,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_KV_Txn_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1643,6 +1658,8 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server mux.Handle("POST", pattern_KV_Compact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1650,6 +1667,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_KV_Compact_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1666,6 +1684,7 @@ func RegisterKVHandlerServer(ctx context.Context, mux *runtime.ServeMux, server // etcdserverpb.RegisterWatchHandlerServer registers the http handlers for service Watch to "mux". // UnaryRPC :call etcdserverpb.WatchServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWatchHandlerFromEndpoint instead. func RegisterWatchHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.WatchServer) error { mux.Handle("POST", pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1681,11 +1700,14 @@ func RegisterWatchHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // etcdserverpb.RegisterLeaseHandlerServer registers the http handlers for service Lease to "mux". // UnaryRPC :call etcdserverpb.LeaseServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLeaseHandlerFromEndpoint instead. func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.LeaseServer) error { mux.Handle("POST", pattern_Lease_LeaseGrant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1693,6 +1715,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseGrant_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1706,6 +1729,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseRevoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1713,6 +1738,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseRevoke_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1726,6 +1752,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseRevoke_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1733,6 +1761,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseRevoke_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1753,6 +1782,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseTimeToLive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1760,6 +1791,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseTimeToLive_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1773,6 +1805,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseTimeToLive_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1780,6 +1814,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseTimeToLive_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1793,6 +1828,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseLeases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1800,6 +1837,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseLeases_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1813,6 +1851,8 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Lease_LeaseLeases_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1820,6 +1860,7 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Lease_LeaseLeases_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1836,11 +1877,14 @@ func RegisterLeaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // etcdserverpb.RegisterClusterHandlerServer registers the http handlers for service Cluster to "mux". // UnaryRPC :call etcdserverpb.ClusterServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterHandlerFromEndpoint instead. func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.ClusterServer) error { mux.Handle("POST", pattern_Cluster_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1848,6 +1892,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Cluster_MemberAdd_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1861,6 +1906,8 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("POST", pattern_Cluster_MemberRemove_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1868,6 +1915,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Cluster_MemberRemove_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1881,6 +1929,8 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("POST", pattern_Cluster_MemberUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1888,6 +1938,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Cluster_MemberUpdate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1901,6 +1952,8 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("POST", pattern_Cluster_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1908,6 +1961,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Cluster_MemberList_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1921,6 +1975,8 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("POST", pattern_Cluster_MemberPromote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1928,6 +1984,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Cluster_MemberPromote_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1944,11 +2001,14 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se // etcdserverpb.RegisterMaintenanceHandlerServer registers the http handlers for service Maintenance to "mux". // UnaryRPC :call etcdserverpb.MaintenanceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMaintenanceHandlerFromEndpoint instead. func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.MaintenanceServer) error { mux.Handle("POST", pattern_Maintenance_Alarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1956,6 +2016,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_Alarm_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1969,6 +2030,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1976,6 +2039,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_Status_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1989,6 +2053,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_Defragment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1996,6 +2062,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_Defragment_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2009,6 +2076,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_Hash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2016,6 +2085,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_Hash_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2029,6 +2099,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_HashKV_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2036,6 +2108,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_HashKV_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2056,6 +2129,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_MoveLeader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2063,6 +2138,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_MoveLeader_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2076,6 +2152,8 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux mux.Handle("POST", pattern_Maintenance_Downgrade_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2083,6 +2161,7 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } resp, md, err := local_request_Maintenance_Downgrade_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2099,11 +2178,14 @@ func RegisterMaintenanceHandlerServer(ctx context.Context, mux *runtime.ServeMux // etcdserverpb.RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". // UnaryRPC :call etcdserverpb.AuthServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthHandlerFromEndpoint instead. func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server etcdserverpb.AuthServer) error { mux.Handle("POST", pattern_Auth_AuthEnable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2111,6 +2193,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_AuthEnable_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2124,6 +2207,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_AuthDisable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2131,6 +2216,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_AuthDisable_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2144,6 +2230,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_AuthStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2151,6 +2239,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_AuthStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2164,6 +2253,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_Authenticate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2171,6 +2262,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_Authenticate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2184,6 +2276,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2191,6 +2285,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserAdd_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2204,6 +2299,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2211,6 +2308,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserGet_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2224,6 +2322,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2231,6 +2331,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserList_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2244,6 +2345,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2251,6 +2354,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserDelete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2264,6 +2368,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2271,6 +2377,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserChangePassword_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2284,6 +2391,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserGrantRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2291,6 +2400,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserGrantRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2304,6 +2414,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_UserRevokeRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2311,6 +2423,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_UserRevokeRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2324,6 +2437,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2331,6 +2446,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleAdd_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2344,6 +2460,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2351,6 +2469,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleGet_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2364,6 +2483,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2371,6 +2492,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleList_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2384,6 +2506,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2391,6 +2515,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleDelete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2404,6 +2529,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleGrantPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2411,6 +2538,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleGrantPermission_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2424,6 +2552,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_RoleRevokePermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -2431,6 +2561,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_RoleRevokePermission_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/server/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go b/server/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go index 4a6e5e724cc..432fb9c4477 100644 --- a/server/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go +++ b/server/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,6 +32,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq v3electionpb.CampaignRequest @@ -196,11 +198,14 @@ func local_request_Election_Resign_0(ctx context.Context, marshaler runtime.Mars // v3electionpb.RegisterElectionHandlerServer registers the http handlers for service Election to "mux". // UnaryRPC :call v3electionpb.ElectionServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterElectionHandlerFromEndpoint instead. func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server v3electionpb.ElectionServer) error { mux.Handle("POST", pattern_Election_Campaign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -208,6 +213,7 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Election_Campaign_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -221,6 +227,8 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s mux.Handle("POST", pattern_Election_Proclaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -228,6 +236,7 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Election_Proclaim_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -241,6 +250,8 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s mux.Handle("POST", pattern_Election_Leader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -248,6 +259,7 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Election_Leader_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -268,6 +280,8 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s mux.Handle("POST", pattern_Election_Resign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -275,6 +289,7 @@ func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Election_Resign_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/server/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go b/server/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go index dc573d79cf0..27be5acc558 100644 --- a/server/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go +++ b/server/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,6 +32,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq v3lockpb.LockRequest @@ -103,11 +105,14 @@ func local_request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshale // v3lockpb.RegisterLockHandlerServer registers the http handlers for service Lock to "mux". // UnaryRPC :call v3lockpb.LockServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLockHandlerFromEndpoint instead. func RegisterLockHandlerServer(ctx context.Context, mux *runtime.ServeMux, server v3lockpb.LockServer) error { mux.Handle("POST", pattern_Lock_Lock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -115,6 +120,7 @@ func RegisterLockHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Lock_Lock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -128,6 +134,8 @@ func RegisterLockHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Lock_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -135,6 +143,7 @@ func RegisterLockHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Lock_Unlock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)