mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #51721 from vvoland/deprecate-grpc
api: deprecate /grpc and /session endpoints
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
// Package grpc provides the router for the /grpc endpoint.
|
||||
//
|
||||
// Deprecated: The /grpc endpoint is deprecated and will be removed in the next
|
||||
// major version. The Engine now properly supports HTTP/2 and h2c requests and can
|
||||
// serve gRPC without this endpoint. Clients should establish gRPC connections
|
||||
// directly over HTTP/2.
|
||||
package grpc
|
||||
|
||||
import (
|
||||
@@ -25,6 +31,9 @@ type grpcRouter struct {
|
||||
}
|
||||
|
||||
// NewRouter initializes a new grpc http router
|
||||
//
|
||||
// Deprecated: The /grpc endpoint is deprecated and will be removed in the next
|
||||
// major version. The Engine now properly supports HTTP/2 and h2c requests.
|
||||
func NewRouter(backends ...Backend) router.Router {
|
||||
tp, _ := otelutil.NewTracerProvider(context.Background(), false)
|
||||
opts := []grpc.ServerOption{
|
||||
|
||||
@@ -9,6 +9,9 @@ type sessionRouter struct {
|
||||
}
|
||||
|
||||
// NewRouter initializes a new session router
|
||||
//
|
||||
// Deprecated: The /session endpoint is deprecated and will be removed in the next
|
||||
// major version. The Engine now properly supports HTTP/2 and h2c requests.
|
||||
func NewRouter(b Backend) router.Router {
|
||||
r := &sessionRouter{
|
||||
backend: b,
|
||||
|
||||
Reference in New Issue
Block a user