Created
July 23, 2020 16:22
-
-
Save irfansharif/5435bafc9968c3c395fd99af63079299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/.gitattributes w/.gitattributes | |
index 1c8136ec7b..931707fe43 100644 | |
--- i/.gitattributes | |
+++ w/.gitattributes | |
@@ -1,2 +1 @@ | |
-*.pb.* -diff | |
*.eg.go -diff | |
diff --git i/pkg/server/serverpb/admin.pb.gw.go w/pkg/server/serverpb/admin.pb.gw.go | |
index 318569f9f9..0d62070545 100644 | |
--- i/pkg/server/serverpb/admin.pb.gw.go | |
+++ w/pkg/server/serverpb/admin.pb.gw.go | |
@@ -9,11 +9,11 @@ It translates gRPC into RESTful JSON APIs. | |
package serverpb | |
import ( | |
- "context" | |
"io" | |
"net/http" | |
- "github.com/golang/protobuf/descriptor" | |
+ "context" | |
+ | |
"github.com/golang/protobuf/proto" | |
"github.com/grpc-ecosystem/grpc-gateway/runtime" | |
"github.com/grpc-ecosystem/grpc-gateway/utilities" | |
@@ -23,13 +23,11 @@ import ( | |
"google.golang.org/grpc/status" | |
) | |
-// Suppress "imported and not used" errors | |
var _ codes.Code | |
var _ io.Reader | |
var _ status.Status | |
var _ = runtime.String | |
var _ = utilities.NewDoubleArray | |
-var _ = descriptor.ForMessage | |
func request_Admin_Users_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq UsersRequest | |
@@ -40,15 +38,6 @@ func request_Admin_Users_0(ctx context.Context, marshaler runtime.Marshaler, cli | |
} | |
-func local_request_Admin_Users_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq UsersRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Users(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_Databases_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq DatabasesRequest | |
var metadata runtime.ServerMetadata | |
@@ -58,15 +47,6 @@ func request_Admin_Databases_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_Databases_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq DatabasesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Databases(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_DatabaseDetails_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq DatabaseDetailsRequest | |
var metadata runtime.ServerMetadata | |
@@ -94,33 +74,6 @@ func request_Admin_DatabaseDetails_0(ctx context.Context, marshaler runtime.Mars | |
} | |
-func local_request_Admin_DatabaseDetails_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq DatabaseDetailsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["database"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database") | |
- } | |
- | |
- protoReq.Database, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database", err) | |
- } | |
- | |
- msg, err := server.DatabaseDetails(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_TableDetails_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq TableDetailsRequest | |
var metadata runtime.ServerMetadata | |
@@ -159,44 +112,6 @@ func request_Admin_TableDetails_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Admin_TableDetails_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq TableDetailsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["database"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database") | |
- } | |
- | |
- protoReq.Database, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database", err) | |
- } | |
- | |
- val, ok = pathParams["table"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "table") | |
- } | |
- | |
- protoReq.Table, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "table", err) | |
- } | |
- | |
- msg, err := server.TableDetails(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_TableStats_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq TableStatsRequest | |
var metadata runtime.ServerMetadata | |
@@ -235,44 +150,6 @@ func request_Admin_TableStats_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Admin_TableStats_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq TableStatsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["database"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database") | |
- } | |
- | |
- protoReq.Database, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database", err) | |
- } | |
- | |
- val, ok = pathParams["table"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "table") | |
- } | |
- | |
- protoReq.Table, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "table", err) | |
- } | |
- | |
- msg, err := server.TableStats(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_NonTableStats_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq NonTableStatsRequest | |
var metadata runtime.ServerMetadata | |
@@ -282,15 +159,6 @@ func request_Admin_NonTableStats_0(ctx context.Context, marshaler runtime.Marsha | |
} | |
-func local_request_Admin_NonTableStats_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq NonTableStatsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.NonTableStats(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_Events_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -299,10 +167,7 @@ func request_Admin_Events_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
var protoReq EventsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Events_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_Events_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -311,31 +176,11 @@ func request_Admin_Events_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
} | |
-func local_request_Admin_Events_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq EventsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Events_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Events(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_SetUIData_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq SetUIDataRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -344,23 +189,6 @@ func request_Admin_SetUIData_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_SetUIData_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq SetUIDataRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.SetUIData(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_GetUIData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -369,10 +197,7 @@ func request_Admin_GetUIData_0(ctx context.Context, marshaler runtime.Marshaler, | |
var protoReq GetUIDataRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_GetUIData_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_GetUIData_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -381,22 +206,6 @@ func request_Admin_GetUIData_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_GetUIData_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq GetUIDataRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_GetUIData_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.GetUIData(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_Cluster_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq ClusterRequest | |
var metadata runtime.ServerMetadata | |
@@ -406,15 +215,6 @@ func request_Admin_Cluster_0(ctx context.Context, marshaler runtime.Marshaler, c | |
} | |
-func local_request_Admin_Cluster_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ClusterRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Cluster(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_Settings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -423,10 +223,7 @@ func request_Admin_Settings_0(ctx context.Context, marshaler runtime.Marshaler, | |
var protoReq SettingsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Settings_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_Settings_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -435,22 +232,6 @@ func request_Admin_Settings_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_Settings_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq SettingsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Settings_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Settings(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_Health_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -459,10 +240,7 @@ func request_Admin_Health_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
var protoReq HealthRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Health_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_Health_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -471,22 +249,6 @@ func request_Admin_Health_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
} | |
-func local_request_Admin_Health_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq HealthRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Health_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Health(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_Health_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -495,10 +257,7 @@ func request_Admin_Health_1(ctx context.Context, marshaler runtime.Marshaler, cl | |
var protoReq HealthRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Health_1); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_Health_1); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -507,22 +266,6 @@ func request_Admin_Health_1(ctx context.Context, marshaler runtime.Marshaler, cl | |
} | |
-func local_request_Admin_Health_1(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq HealthRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Health_1); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Health(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_Liveness_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq LivenessRequest | |
var metadata runtime.ServerMetadata | |
@@ -532,15 +275,6 @@ func request_Admin_Liveness_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_Liveness_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq LivenessRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Liveness(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_Jobs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -549,10 +283,7 @@ func request_Admin_Jobs_0(ctx context.Context, marshaler runtime.Marshaler, clie | |
var protoReq JobsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Jobs_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_Jobs_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -561,22 +292,6 @@ func request_Admin_Jobs_0(ctx context.Context, marshaler runtime.Marshaler, clie | |
} | |
-func local_request_Admin_Jobs_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq JobsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_Jobs_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Jobs(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_Locations_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq LocationsRequest | |
var metadata runtime.ServerMetadata | |
@@ -586,15 +301,6 @@ func request_Admin_Locations_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_Locations_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq LocationsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Locations(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_QueryPlan_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -603,10 +309,7 @@ func request_Admin_QueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, | |
var protoReq QueryPlanRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_QueryPlan_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_QueryPlan_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -615,22 +318,6 @@ func request_Admin_QueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_QueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq QueryPlanRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_QueryPlan_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.QueryPlan(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_RangeLog_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -639,10 +326,7 @@ func request_Admin_RangeLog_0(ctx context.Context, marshaler runtime.Marshaler, | |
var protoReq RangeLogRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_RangeLog_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_RangeLog_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -651,22 +335,6 @@ func request_Admin_RangeLog_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_RangeLog_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq RangeLogRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_RangeLog_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.RangeLog(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Admin_RangeLog_1 = &utilities.DoubleArray{Encoding: map[string]int{"range_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -693,10 +361,7 @@ func request_Admin_RangeLog_1(ctx context.Context, marshaler runtime.Marshaler, | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "range_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_RangeLog_1); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Admin_RangeLog_1); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -705,40 +370,6 @@ func request_Admin_RangeLog_1(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Admin_RangeLog_1(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq RangeLogRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["range_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "range_id") | |
- } | |
- | |
- protoReq.RangeId, err = runtime.Int64(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "range_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Admin_RangeLog_1); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.RangeLog(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_DataDistribution_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq DataDistributionRequest | |
var metadata runtime.ServerMetadata | |
@@ -748,15 +379,6 @@ func request_Admin_DataDistribution_0(ctx context.Context, marshaler runtime.Mar | |
} | |
-func local_request_Admin_DataDistribution_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq DataDistributionRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.DataDistribution(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_AllMetricMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq MetricMetadataRequest | |
var metadata runtime.ServerMetadata | |
@@ -766,15 +388,6 @@ func request_Admin_AllMetricMetadata_0(ctx context.Context, marshaler runtime.Ma | |
} | |
-func local_request_Admin_AllMetricMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq MetricMetadataRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.AllMetricMetadata(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_ChartCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq ChartCatalogRequest | |
var metadata runtime.ServerMetadata | |
@@ -784,24 +397,11 @@ func request_Admin_ChartCatalog_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Admin_ChartCatalog_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ChartCatalogRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.ChartCatalog(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Admin_EnqueueRange_0(ctx context.Context, marshaler runtime.Marshaler, client AdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq EnqueueRangeRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -810,491 +410,6 @@ func request_Admin_EnqueueRange_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Admin_EnqueueRange_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq EnqueueRangeRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.EnqueueRange(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
-// RegisterAdminHandlerServer registers the http handlers for service Admin to "mux". | |
-// UnaryRPC :call AdminServer directly. | |
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. | |
-func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdminServer) error { | |
- | |
- mux.Handle("GET", pattern_Admin_Users_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Users_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Users_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Databases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Databases_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Databases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_DatabaseDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_DatabaseDetails_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_DatabaseDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_TableDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_TableDetails_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_TableDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_TableStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_TableStats_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_TableStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_NonTableStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_NonTableStats_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_NonTableStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Events_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Events_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Events_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("POST", pattern_Admin_SetUIData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_SetUIData_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_SetUIData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_GetUIData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_GetUIData_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_GetUIData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Cluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Cluster_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Cluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Settings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Settings_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Settings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Health_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Health_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Health_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Health_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Health_1(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Health_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Liveness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Liveness_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Liveness_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Jobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Jobs_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Jobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_Locations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_Locations_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_Locations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_QueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_QueryPlan_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_QueryPlan_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_RangeLog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_RangeLog_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_RangeLog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_RangeLog_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_RangeLog_1(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_RangeLog_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_DataDistribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_DataDistribution_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_DataDistribution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_AllMetricMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_AllMetricMetadata_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_AllMetricMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Admin_ChartCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_ChartCatalog_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_ChartCatalog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("POST", pattern_Admin_EnqueueRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Admin_EnqueueRange_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Admin_EnqueueRange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- return nil | |
-} | |
- | |
// RegisterAdminHandlerFromEndpoint is same as RegisterAdminHandler but | |
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. | |
func RegisterAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { | |
@@ -1336,6 +451,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Users_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1356,6 +480,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Databases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1376,6 +509,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_DatabaseDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1396,6 +538,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_TableDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1416,6 +567,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_TableStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1436,6 +596,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_NonTableStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1456,6 +625,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Events_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1476,6 +654,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("POST", pattern_Admin_SetUIData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1496,6 +683,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_GetUIData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1516,6 +712,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Cluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1536,6 +741,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Settings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1556,6 +770,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Health_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1576,6 +799,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Health_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1596,6 +828,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Liveness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1616,6 +857,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Jobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1636,6 +886,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_Locations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1656,6 +915,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_QueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1676,6 +944,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_RangeLog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1696,6 +973,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_RangeLog_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1716,6 +1002,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_DataDistribution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1736,6 +1031,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_AllMetricMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1756,6 +1060,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("GET", pattern_Admin_ChartCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1776,6 +1089,15 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("POST", pattern_Admin_EnqueueRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -1797,51 +1119,51 @@ func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
} | |
var ( | |
- pattern_Admin_Users_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "users"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Users_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "users"}, "")) | |
- pattern_Admin_Databases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "databases"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Databases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "databases"}, "")) | |
- pattern_Admin_DatabaseDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_admin", "v1", "databases", "database"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_DatabaseDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_admin", "v1", "databases", "database"}, "")) | |
- pattern_Admin_TableDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"_admin", "v1", "databases", "database", "tables", "table"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_TableDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"_admin", "v1", "databases", "database", "tables", "table"}, "")) | |
- pattern_Admin_TableStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"_admin", "v1", "databases", "database", "tables", "table", "stats"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_TableStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"_admin", "v1", "databases", "database", "tables", "table", "stats"}, "")) | |
- pattern_Admin_NonTableStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "nontablestats"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_NonTableStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "nontablestats"}, "")) | |
- pattern_Admin_Events_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "events"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Events_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "events"}, "")) | |
- pattern_Admin_SetUIData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "uidata"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_SetUIData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "uidata"}, "")) | |
- pattern_Admin_GetUIData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "uidata"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_GetUIData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "uidata"}, "")) | |
- pattern_Admin_Cluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "cluster"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Cluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "cluster"}, "")) | |
- pattern_Admin_Settings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "settings"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Settings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "settings"}, "")) | |
- pattern_Admin_Health_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "health"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Health_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "health"}, "")) | |
- pattern_Admin_Health_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Health_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) | |
- pattern_Admin_Liveness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "liveness"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Liveness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "liveness"}, "")) | |
- pattern_Admin_Jobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "jobs"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Jobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "jobs"}, "")) | |
- pattern_Admin_Locations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "locations"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_Locations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "locations"}, "")) | |
- pattern_Admin_QueryPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "queryplan"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_QueryPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "queryplan"}, "")) | |
- pattern_Admin_RangeLog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "rangelog"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_RangeLog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "rangelog"}, "")) | |
- pattern_Admin_RangeLog_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_admin", "v1", "rangelog", "range_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_RangeLog_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_admin", "v1", "rangelog", "range_id"}, "")) | |
- pattern_Admin_DataDistribution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "data_distribution"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_DataDistribution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "data_distribution"}, "")) | |
- pattern_Admin_AllMetricMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "metricmetadata"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_AllMetricMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "metricmetadata"}, "")) | |
- pattern_Admin_ChartCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "chartcatalog"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_ChartCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "chartcatalog"}, "")) | |
- pattern_Admin_EnqueueRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "enqueue_range"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Admin_EnqueueRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"_admin", "v1", "enqueue_range"}, "")) | |
) | |
var ( | |
diff --git i/pkg/server/serverpb/authentication.pb.gw.go w/pkg/server/serverpb/authentication.pb.gw.go | |
index 2e663103e5..1bd4163dc9 100644 | |
--- i/pkg/server/serverpb/authentication.pb.gw.go | |
+++ w/pkg/server/serverpb/authentication.pb.gw.go | |
@@ -9,11 +9,11 @@ It translates gRPC into RESTful JSON APIs. | |
package serverpb | |
import ( | |
- "context" | |
"io" | |
"net/http" | |
- "github.com/golang/protobuf/descriptor" | |
+ "context" | |
+ | |
"github.com/golang/protobuf/proto" | |
"github.com/grpc-ecosystem/grpc-gateway/runtime" | |
"github.com/grpc-ecosystem/grpc-gateway/utilities" | |
@@ -23,23 +23,17 @@ import ( | |
"google.golang.org/grpc/status" | |
) | |
-// Suppress "imported and not used" errors | |
var _ codes.Code | |
var _ io.Reader | |
var _ status.Status | |
var _ = runtime.String | |
var _ = utilities.NewDoubleArray | |
-var _ = descriptor.ForMessage | |
func request_LogIn_UserLogin_0(ctx context.Context, marshaler runtime.Marshaler, client LogInClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq UserLoginRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -48,23 +42,6 @@ func request_LogIn_UserLogin_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_LogIn_UserLogin_0(ctx context.Context, marshaler runtime.Marshaler, server LogInServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq UserLoginRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.UserLogin(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_LogOut_UserLogout_0(ctx context.Context, marshaler runtime.Marshaler, client LogOutClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq UserLogoutRequest | |
var metadata runtime.ServerMetadata | |
@@ -74,71 +51,6 @@ func request_LogOut_UserLogout_0(ctx context.Context, marshaler runtime.Marshale | |
} | |
-func local_request_LogOut_UserLogout_0(ctx context.Context, marshaler runtime.Marshaler, server LogOutServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq UserLogoutRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.UserLogout(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
-// RegisterLogInHandlerServer registers the http handlers for service LogIn to "mux". | |
-// UnaryRPC :call LogInServer directly. | |
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. | |
-func RegisterLogInHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogInServer) error { | |
- | |
- mux.Handle("POST", pattern_LogIn_UserLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_LogIn_UserLogin_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_LogIn_UserLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- return nil | |
-} | |
- | |
-// RegisterLogOutHandlerServer registers the http handlers for service LogOut to "mux". | |
-// UnaryRPC :call LogOutServer directly. | |
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. | |
-func RegisterLogOutHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogOutServer) error { | |
- | |
- mux.Handle("GET", pattern_LogOut_UserLogout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_LogOut_UserLogout_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_LogOut_UserLogout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- return nil | |
-} | |
- | |
// RegisterLogInHandlerFromEndpoint is same as RegisterLogInHandler but | |
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. | |
func RegisterLogInHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { | |
@@ -180,6 +92,15 @@ func RegisterLogInHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
mux.Handle("POST", pattern_LogIn_UserLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -201,7 +122,7 @@ func RegisterLogInHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie | |
} | |
var ( | |
- pattern_LogIn_UserLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_LogIn_UserLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "")) | |
) | |
var ( | |
@@ -249,6 +170,15 @@ func RegisterLogOutHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_LogOut_UserLogout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -270,7 +200,7 @@ func RegisterLogOutHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
} | |
var ( | |
- pattern_LogOut_UserLogout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"logout"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_LogOut_UserLogout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"logout"}, "")) | |
) | |
var ( | |
diff --git i/pkg/server/serverpb/status.pb.gw.go w/pkg/server/serverpb/status.pb.gw.go | |
index 66d381cbb4..2bb76dfb14 100644 | |
--- i/pkg/server/serverpb/status.pb.gw.go | |
+++ w/pkg/server/serverpb/status.pb.gw.go | |
@@ -9,11 +9,11 @@ It translates gRPC into RESTful JSON APIs. | |
package serverpb | |
import ( | |
- "context" | |
"io" | |
"net/http" | |
- "github.com/golang/protobuf/descriptor" | |
+ "context" | |
+ | |
"github.com/golang/protobuf/proto" | |
"github.com/grpc-ecosystem/grpc-gateway/runtime" | |
"github.com/grpc-ecosystem/grpc-gateway/utilities" | |
@@ -23,13 +23,11 @@ import ( | |
"google.golang.org/grpc/status" | |
) | |
-// Suppress "imported and not used" errors | |
var _ codes.Code | |
var _ io.Reader | |
var _ status.Status | |
var _ = runtime.String | |
var _ = utilities.NewDoubleArray | |
-var _ = descriptor.ForMessage | |
func request_Status_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq CertificatesRequest | |
@@ -58,33 +56,6 @@ func request_Status_Certificates_0(ctx context.Context, marshaler runtime.Marsha | |
} | |
-func local_request_Status_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq CertificatesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Certificates(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Details_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq DetailsRequest | |
var metadata runtime.ServerMetadata | |
@@ -112,33 +83,6 @@ func request_Status_Details_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Status_Details_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq DetailsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Details(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Nodes_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq NodesRequest | |
var metadata runtime.ServerMetadata | |
@@ -148,15 +92,6 @@ func request_Status_Nodes_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
} | |
-func local_request_Status_Nodes_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq NodesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.Nodes(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Node_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq NodeRequest | |
var metadata runtime.ServerMetadata | |
@@ -184,33 +119,6 @@ func request_Status_Node_0(ctx context.Context, marshaler runtime.Marshaler, cli | |
} | |
-func local_request_Status_Node_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq NodeRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Node(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_RaftDebug_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -219,10 +127,7 @@ func request_Status_RaftDebug_0(ctx context.Context, marshaler runtime.Marshaler | |
var protoReq RaftDebugRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_RaftDebug_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_RaftDebug_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -231,22 +136,6 @@ func request_Status_RaftDebug_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Status_RaftDebug_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq RaftDebugRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_RaftDebug_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.RaftDebug(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Ranges_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -273,10 +162,7 @@ func request_Status_Ranges_0(ctx context.Context, marshaler runtime.Marshaler, c | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Ranges_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Ranges_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -285,40 +171,6 @@ func request_Status_Ranges_0(ctx context.Context, marshaler runtime.Marshaler, c | |
} | |
-func local_request_Status_Ranges_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq RangesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Ranges_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Ranges(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Gossip_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq GossipRequest | |
var metadata runtime.ServerMetadata | |
@@ -346,33 +198,6 @@ func request_Status_Gossip_0(ctx context.Context, marshaler runtime.Marshaler, c | |
} | |
-func local_request_Status_Gossip_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq GossipRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Gossip(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_EngineStats_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq EngineStatsRequest | |
var metadata runtime.ServerMetadata | |
@@ -400,33 +225,6 @@ func request_Status_EngineStats_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Status_EngineStats_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq EngineStatsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.EngineStats(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Allocator_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -453,10 +251,7 @@ func request_Status_Allocator_0(ctx context.Context, marshaler runtime.Marshaler | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Allocator_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Allocator_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -465,40 +260,6 @@ func request_Status_Allocator_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Status_Allocator_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq AllocatorRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Allocator_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Allocator(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_AllocatorRange_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq AllocatorRangeRequest | |
var metadata runtime.ServerMetadata | |
@@ -526,33 +287,6 @@ func request_Status_AllocatorRange_0(ctx context.Context, marshaler runtime.Mars | |
} | |
-func local_request_Status_AllocatorRange_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq AllocatorRangeRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["range_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "range_id") | |
- } | |
- | |
- protoReq.RangeId, err = runtime.Int64(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "range_id", err) | |
- } | |
- | |
- msg, err := server.AllocatorRange(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_ListSessions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -561,10 +295,7 @@ func request_Status_ListSessions_0(ctx context.Context, marshaler runtime.Marsha | |
var protoReq ListSessionsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ListSessions_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_ListSessions_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -573,22 +304,6 @@ func request_Status_ListSessions_0(ctx context.Context, marshaler runtime.Marsha | |
} | |
-func local_request_Status_ListSessions_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ListSessionsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ListSessions_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.ListSessions(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_ListLocalSessions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -597,10 +312,7 @@ func request_Status_ListLocalSessions_0(ctx context.Context, marshaler runtime.M | |
var protoReq ListSessionsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ListLocalSessions_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_ListLocalSessions_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -609,22 +321,6 @@ func request_Status_ListLocalSessions_0(ctx context.Context, marshaler runtime.M | |
} | |
-func local_request_Status_ListLocalSessions_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ListSessionsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ListLocalSessions_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.ListLocalSessions(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_CancelQuery_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -651,10 +347,7 @@ func request_Status_CancelQuery_0(ctx context.Context, marshaler runtime.Marshal | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_CancelQuery_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_CancelQuery_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -663,40 +356,6 @@ func request_Status_CancelQuery_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Status_CancelQuery_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq CancelQueryRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_CancelQuery_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.CancelQuery(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_CancelSession_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -723,10 +382,7 @@ func request_Status_CancelSession_0(ctx context.Context, marshaler runtime.Marsh | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_CancelSession_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_CancelSession_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -735,49 +391,11 @@ func request_Status_CancelSession_0(ctx context.Context, marshaler runtime.Marsh | |
} | |
-func local_request_Status_CancelSession_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq CancelSessionRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_CancelSession_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.CancelSession(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_SpanStats_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq SpanStatsRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -786,23 +404,6 @@ func request_Status_SpanStats_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Status_SpanStats_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq SpanStatsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.SpanStats(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Stacks_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -829,10 +430,7 @@ func request_Status_Stacks_0(ctx context.Context, marshaler runtime.Marshaler, c | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Stacks_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Stacks_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -841,40 +439,6 @@ func request_Status_Stacks_0(ctx context.Context, marshaler runtime.Marshaler, c | |
} | |
-func local_request_Status_Stacks_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq StacksRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Stacks_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Stacks(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Profile_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -901,10 +465,7 @@ func request_Status_Profile_0(ctx context.Context, marshaler runtime.Marshaler, | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Profile_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Profile_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -913,40 +474,6 @@ func request_Status_Profile_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Status_Profile_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ProfileRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Profile_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Profile(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Metrics_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq MetricsRequest | |
var metadata runtime.ServerMetadata | |
@@ -974,33 +501,6 @@ func request_Status_Metrics_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Status_Metrics_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq MetricsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Metrics(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_GetFiles_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -1027,10 +527,7 @@ func request_Status_GetFiles_0(ctx context.Context, marshaler runtime.Marshaler, | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_GetFiles_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_GetFiles_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1039,40 +536,6 @@ func request_Status_GetFiles_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Status_GetFiles_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq GetFilesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_GetFiles_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.GetFiles(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_LogFilesList_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq LogFilesListRequest | |
var metadata runtime.ServerMetadata | |
@@ -1100,33 +563,6 @@ func request_Status_LogFilesList_0(ctx context.Context, marshaler runtime.Marsha | |
} | |
-func local_request_Status_LogFilesList_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq LogFilesListRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.LogFilesList(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_LogFile_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0, "file": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} | |
) | |
@@ -1164,10 +600,7 @@ func request_Status_LogFile_0(ctx context.Context, marshaler runtime.Marshaler, | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "file", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_LogFile_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_LogFile_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1176,51 +609,6 @@ func request_Status_LogFile_0(ctx context.Context, marshaler runtime.Marshaler, | |
} | |
-func local_request_Status_LogFile_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq LogFileRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- val, ok = pathParams["file"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "file") | |
- } | |
- | |
- protoReq.File, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "file", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_LogFile_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.LogFile(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Logs_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} | |
) | |
@@ -1247,10 +635,7 @@ func request_Status_Logs_0(ctx context.Context, marshaler runtime.Marshaler, cli | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
} | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Logs_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Logs_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1259,40 +644,6 @@ func request_Status_Logs_0(ctx context.Context, marshaler runtime.Marshaler, cli | |
} | |
-func local_request_Status_Logs_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq LogsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Logs_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Logs(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_ProblemRanges_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -1301,10 +652,7 @@ func request_Status_ProblemRanges_0(ctx context.Context, marshaler runtime.Marsh | |
var protoReq ProblemRangesRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ProblemRanges_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_ProblemRanges_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1313,22 +661,6 @@ func request_Status_ProblemRanges_0(ctx context.Context, marshaler runtime.Marsh | |
} | |
-func local_request_Status_ProblemRanges_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq ProblemRangesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_ProblemRanges_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.ProblemRanges(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_HotRanges_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -1337,10 +669,7 @@ func request_Status_HotRanges_0(ctx context.Context, marshaler runtime.Marshaler | |
var protoReq HotRangesRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_HotRanges_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_HotRanges_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1349,22 +678,6 @@ func request_Status_HotRanges_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Status_HotRanges_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq HotRangesRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_HotRanges_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.HotRanges(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Range_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq RangeRequest | |
var metadata runtime.ServerMetadata | |
@@ -1392,33 +705,6 @@ func request_Status_Range_0(ctx context.Context, marshaler runtime.Marshaler, cl | |
} | |
-func local_request_Status_Range_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq RangeRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["range_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "range_id") | |
- } | |
- | |
- protoReq.RangeId, err = runtime.Int64(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "range_id", err) | |
- } | |
- | |
- msg, err := server.Range(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Diagnostics_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq DiagnosticsRequest | |
var metadata runtime.ServerMetadata | |
@@ -1446,33 +732,6 @@ func request_Status_Diagnostics_0(ctx context.Context, marshaler runtime.Marshal | |
} | |
-func local_request_Status_Diagnostics_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq DiagnosticsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Diagnostics(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_Stores_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq StoresRequest | |
var metadata runtime.ServerMetadata | |
@@ -1500,33 +759,6 @@ func request_Status_Stores_0(ctx context.Context, marshaler runtime.Marshaler, c | |
} | |
-func local_request_Status_Stores_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq StoresRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.Stores(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
var ( | |
filter_Status_Statements_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |
) | |
@@ -1535,10 +767,7 @@ func request_Status_Statements_0(ctx context.Context, marshaler runtime.Marshale | |
var protoReq StatementsRequest | |
var metadata runtime.ServerMetadata | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Statements_0); err != nil { | |
+ if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Status_Statements_0); err != nil { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1547,31 +776,11 @@ func request_Status_Statements_0(ctx context.Context, marshaler runtime.Marshale | |
} | |
-func local_request_Status_Statements_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq StatementsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- if err := req.ParseForm(); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Status_Statements_0); err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Statements(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_CreateStatementDiagnosticsReport_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq CreateStatementDiagnosticsReportRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -1580,23 +789,6 @@ func request_Status_CreateStatementDiagnosticsReport_0(ctx context.Context, mars | |
} | |
-func local_request_Status_CreateStatementDiagnosticsReport_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq CreateStatementDiagnosticsReportRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.CreateStatementDiagnosticsReport(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_StatementDiagnosticsRequests_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq StatementDiagnosticsReportsRequest | |
var metadata runtime.ServerMetadata | |
@@ -1606,15 +798,6 @@ func request_Status_StatementDiagnosticsRequests_0(ctx context.Context, marshale | |
} | |
-func local_request_Status_StatementDiagnosticsRequests_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq StatementDiagnosticsReportsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- msg, err := server.StatementDiagnosticsRequests(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_StatementDiagnostics_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq StatementDiagnosticsRequest | |
var metadata runtime.ServerMetadata | |
@@ -1642,33 +825,6 @@ func request_Status_StatementDiagnostics_0(ctx context.Context, marshaler runtim | |
} | |
-func local_request_Status_StatementDiagnostics_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq StatementDiagnosticsRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["statement_diagnostics_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "statement_diagnostics_id") | |
- } | |
- | |
- protoReq.StatementDiagnosticsId, err = runtime.Int64(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "statement_diagnostics_id", err) | |
- } | |
- | |
- msg, err := server.StatementDiagnostics(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_JobRegistryStatus_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq JobRegistryStatusRequest | |
var metadata runtime.ServerMetadata | |
@@ -1696,33 +852,6 @@ func request_Status_JobRegistryStatus_0(ctx context.Context, marshaler runtime.M | |
} | |
-func local_request_Status_JobRegistryStatus_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq JobRegistryStatusRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["node_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") | |
- } | |
- | |
- protoReq.NodeId, err = runtime.String(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) | |
- } | |
- | |
- msg, err := server.JobRegistryStatus(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
func request_Status_JobStatus_0(ctx context.Context, marshaler runtime.Marshaler, client StatusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq JobStatusRequest | |
var metadata runtime.ServerMetadata | |
@@ -1750,701 +879,6 @@ func request_Status_JobStatus_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_Status_JobStatus_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq JobStatusRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- var ( | |
- val string | |
- ok bool | |
- err error | |
- _ = err | |
- ) | |
- | |
- val, ok = pathParams["job_id"] | |
- if !ok { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "job_id") | |
- } | |
- | |
- protoReq.JobId, err = runtime.Int64(val) | |
- | |
- if err != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "job_id", err) | |
- } | |
- | |
- msg, err := server.JobStatus(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
-// RegisterStatusHandlerServer registers the http handlers for service Status to "mux". | |
-// UnaryRPC :call StatusServer directly. | |
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. | |
-func RegisterStatusHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StatusServer) error { | |
- | |
- mux.Handle("GET", pattern_Status_Certificates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Certificates_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Details_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Details_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Details_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Nodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Nodes_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Nodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Node_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Node_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Node_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_RaftDebug_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_RaftDebug_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_RaftDebug_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Ranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Ranges_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Ranges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Gossip_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Gossip_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Gossip_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_EngineStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_EngineStats_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_EngineStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Allocator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Allocator_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Allocator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_AllocatorRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_AllocatorRange_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_AllocatorRange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_ListSessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_ListSessions_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_ListSessions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_ListLocalSessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_ListLocalSessions_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_ListLocalSessions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_CancelQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_CancelQuery_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_CancelQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_CancelSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_CancelSession_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_CancelSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("POST", pattern_Status_SpanStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_SpanStats_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_SpanStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Stacks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Stacks_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Stacks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Profile_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Profile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Metrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Metrics_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Metrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_GetFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_GetFiles_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_GetFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_LogFilesList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_LogFilesList_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_LogFilesList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_LogFile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_LogFile_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_LogFile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Logs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Logs_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Logs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_ProblemRanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_ProblemRanges_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_ProblemRanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_HotRanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_HotRanges_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_HotRanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Range_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Range_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Range_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Diagnostics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Diagnostics_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Diagnostics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Stores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Stores_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Stores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_Statements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_Statements_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_Statements_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("POST", pattern_Status_CreateStatementDiagnosticsReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_CreateStatementDiagnosticsReport_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_CreateStatementDiagnosticsReport_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_StatementDiagnosticsRequests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_StatementDiagnosticsRequests_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_StatementDiagnosticsRequests_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_StatementDiagnostics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_StatementDiagnostics_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_StatementDiagnostics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_JobRegistryStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_JobRegistryStatus_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_JobRegistryStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- mux.Handle("GET", pattern_Status_JobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_Status_JobStatus_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_Status_JobStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- return nil | |
-} | |
- | |
// RegisterStatusHandlerFromEndpoint is same as RegisterStatusHandler but | |
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. | |
func RegisterStatusHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { | |
@@ -2486,6 +920,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Certificates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2506,6 +949,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Details_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2526,6 +978,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Nodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2546,6 +1007,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Node_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2566,6 +1036,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_RaftDebug_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2586,6 +1065,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Ranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2606,6 +1094,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Gossip_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2626,6 +1123,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_EngineStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2646,6 +1152,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Allocator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2666,6 +1181,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_AllocatorRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2686,6 +1210,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_ListSessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2706,6 +1239,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_ListLocalSessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2726,6 +1268,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_CancelQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2746,6 +1297,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_CancelSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2766,6 +1326,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("POST", pattern_Status_SpanStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2786,6 +1355,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Stacks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2806,6 +1384,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2826,6 +1413,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Metrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2846,6 +1442,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_GetFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2866,6 +1471,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_LogFilesList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2886,6 +1500,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_LogFile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2906,6 +1529,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Logs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2926,6 +1558,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_ProblemRanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2946,6 +1587,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_HotRanges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2966,6 +1616,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Range_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -2986,6 +1645,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Diagnostics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3006,6 +1674,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Stores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3026,6 +1703,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_Statements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3046,6 +1732,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("POST", pattern_Status_CreateStatementDiagnosticsReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3066,6 +1761,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_StatementDiagnosticsRequests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3086,6 +1790,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_StatementDiagnostics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3106,6 +1819,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_JobRegistryStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3126,6 +1848,15 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
mux.Handle("GET", pattern_Status_JobStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -3147,71 +1878,71 @@ func RegisterStatusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli | |
} | |
var ( | |
- pattern_Status_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "certificates", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "certificates", "node_id"}, "")) | |
- pattern_Status_Details_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "details", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Details_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "details", "node_id"}, "")) | |
- pattern_Status_Nodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "nodes"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Nodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "nodes"}, "")) | |
- pattern_Status_Node_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "nodes", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Node_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "nodes", "node_id"}, "")) | |
- pattern_Status_RaftDebug_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "raft"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_RaftDebug_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "raft"}, "")) | |
- pattern_Status_Ranges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "ranges", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Ranges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "ranges", "node_id"}, "")) | |
- pattern_Status_Gossip_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "gossip", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Gossip_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "gossip", "node_id"}, "")) | |
- pattern_Status_EngineStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "enginestats", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_EngineStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "enginestats", "node_id"}, "")) | |
- pattern_Status_Allocator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "allocator", "node", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Allocator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "allocator", "node", "node_id"}, "")) | |
- pattern_Status_AllocatorRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "allocator", "range", "range_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_AllocatorRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "allocator", "range", "range_id"}, "")) | |
- pattern_Status_ListSessions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "sessions"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_ListSessions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "sessions"}, "")) | |
- pattern_Status_ListLocalSessions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "local_sessions"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_ListLocalSessions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "local_sessions"}, "")) | |
- pattern_Status_CancelQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "cancel_query", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_CancelQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "cancel_query", "node_id"}, "")) | |
- pattern_Status_CancelSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "cancel_session", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_CancelSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "cancel_session", "node_id"}, "")) | |
- pattern_Status_SpanStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "span"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_SpanStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "span"}, "")) | |
- pattern_Status_Stacks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stacks", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Stacks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stacks", "node_id"}, "")) | |
- pattern_Status_Profile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "profile", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Profile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "profile", "node_id"}, "")) | |
- pattern_Status_Metrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "metrics", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Metrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "metrics", "node_id"}, "")) | |
- pattern_Status_GetFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "files", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_GetFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "files", "node_id"}, "")) | |
- pattern_Status_LogFilesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "logfiles", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_LogFilesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "logfiles", "node_id"}, "")) | |
- pattern_Status_LogFile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "logfiles", "node_id", "file"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_LogFile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"_status", "logfiles", "node_id", "file"}, "")) | |
- pattern_Status_Logs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "logs", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Logs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "logs", "node_id"}, "")) | |
- pattern_Status_ProblemRanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "problemranges"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_ProblemRanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "problemranges"}, "")) | |
- pattern_Status_HotRanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "hotranges"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_HotRanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "hotranges"}, "")) | |
- pattern_Status_Range_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "range", "range_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Range_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "range", "range_id"}, "")) | |
- pattern_Status_Diagnostics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "diagnostics", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Diagnostics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "diagnostics", "node_id"}, "")) | |
- pattern_Status_Stores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stores", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Stores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stores", "node_id"}, "")) | |
- pattern_Status_Statements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "statements"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_Statements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "statements"}, "")) | |
- pattern_Status_CreateStatementDiagnosticsReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "stmtdiagreports"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_CreateStatementDiagnosticsReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "stmtdiagreports"}, "")) | |
- pattern_Status_StatementDiagnosticsRequests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "stmtdiagreports"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_StatementDiagnosticsRequests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"_status", "stmtdiagreports"}, "")) | |
- pattern_Status_StatementDiagnostics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stmtdiag", "statement_diagnostics_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_StatementDiagnostics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "stmtdiag", "statement_diagnostics_id"}, "")) | |
- pattern_Status_JobRegistryStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "job_registry", "node_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_JobRegistryStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "job_registry", "node_id"}, "")) | |
- pattern_Status_JobStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "job", "job_id"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_Status_JobStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"_status", "job", "job_id"}, "")) | |
) | |
var ( | |
diff --git i/pkg/ts/tspb/timeseries.pb.gw.go w/pkg/ts/tspb/timeseries.pb.gw.go | |
index 989bc9e757..45a5c4ce8f 100644 | |
--- i/pkg/ts/tspb/timeseries.pb.gw.go | |
+++ w/pkg/ts/tspb/timeseries.pb.gw.go | |
@@ -9,11 +9,11 @@ It translates gRPC into RESTful JSON APIs. | |
package tspb | |
import ( | |
- "context" | |
"io" | |
"net/http" | |
- "github.com/golang/protobuf/descriptor" | |
+ "context" | |
+ | |
"github.com/golang/protobuf/proto" | |
"github.com/grpc-ecosystem/grpc-gateway/runtime" | |
"github.com/grpc-ecosystem/grpc-gateway/utilities" | |
@@ -23,23 +23,17 @@ import ( | |
"google.golang.org/grpc/status" | |
) | |
-// Suppress "imported and not used" errors | |
var _ codes.Code | |
var _ io.Reader | |
var _ status.Status | |
var _ = runtime.String | |
var _ = utilities.NewDoubleArray | |
-var _ = descriptor.ForMessage | |
func request_TimeSeries_Query_0(ctx context.Context, marshaler runtime.Marshaler, client TimeSeriesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
var protoReq TimeSeriesQueryRequest | |
var metadata runtime.ServerMetadata | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { | |
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
} | |
@@ -48,51 +42,6 @@ func request_TimeSeries_Query_0(ctx context.Context, marshaler runtime.Marshaler | |
} | |
-func local_request_TimeSeries_Query_0(ctx context.Context, marshaler runtime.Marshaler, server TimeSeriesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | |
- var protoReq TimeSeriesQueryRequest | |
- var metadata runtime.ServerMetadata | |
- | |
- newReader, berr := utilities.IOReaderFactory(req.Body) | |
- if berr != nil { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) | |
- } | |
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { | |
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | |
- } | |
- | |
- msg, err := server.Query(ctx, &protoReq) | |
- return msg, metadata, err | |
- | |
-} | |
- | |
-// RegisterTimeSeriesHandlerServer registers the http handlers for service TimeSeries to "mux". | |
-// UnaryRPC :call TimeSeriesServer directly. | |
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. | |
-func RegisterTimeSeriesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TimeSeriesServer) error { | |
- | |
- mux.Handle("POST", pattern_TimeSeries_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
- ctx, cancel := context.WithCancel(req.Context()) | |
- defer cancel() | |
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | |
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- resp, md, err := local_request_TimeSeries_Query_0(rctx, inboundMarshaler, server, req, pathParams) | |
- ctx = runtime.NewServerMetadataContext(ctx, md) | |
- if err != nil { | |
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | |
- return | |
- } | |
- | |
- forward_TimeSeries_Query_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |
- | |
- }) | |
- | |
- return nil | |
-} | |
- | |
// RegisterTimeSeriesHandlerFromEndpoint is same as RegisterTimeSeriesHandler but | |
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. | |
func RegisterTimeSeriesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { | |
@@ -134,6 +83,15 @@ func RegisterTimeSeriesHandlerClient(ctx context.Context, mux *runtime.ServeMux, | |
mux.Handle("POST", pattern_TimeSeries_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
ctx, cancel := context.WithCancel(req.Context()) | |
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, mux, req) | |
if err != nil { | |
@@ -155,7 +113,7 @@ func RegisterTimeSeriesHandlerClient(ctx context.Context, mux *runtime.ServeMux, | |
} | |
var ( | |
- pattern_TimeSeries_Query_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"ts", "query"}, "", runtime.AssumeColonVerbOpt(true))) | |
+ pattern_TimeSeries_Query_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"ts", "query"}, "")) | |
) | |
var ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment