Regenerate proto with CapabilitiesJson in FetchTaskRequest
This commit is contained in:
@@ -37,12 +37,6 @@ const (
|
||||
PingServicePingProcedure = "/ping.v1.PingService/Ping"
|
||||
)
|
||||
|
||||
// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package.
|
||||
var (
|
||||
pingServiceServiceDescriptor = v1.File_ping_v1_services_proto.Services().ByName("PingService")
|
||||
pingServicePingMethodDescriptor = pingServiceServiceDescriptor.Methods().ByName("Ping")
|
||||
)
|
||||
|
||||
// PingServiceClient is a client for the ping.v1.PingService service.
|
||||
type PingServiceClient interface {
|
||||
Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
|
||||
@@ -57,11 +51,12 @@ type PingServiceClient interface {
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewPingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PingServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
pingServiceMethods := v1.File_ping_v1_services_proto.Services().ByName("PingService").Methods()
|
||||
return &pingServiceClient{
|
||||
ping: connect.NewClient[v1.PingRequest, v1.PingResponse](
|
||||
httpClient,
|
||||
baseURL+PingServicePingProcedure,
|
||||
connect.WithSchema(pingServicePingMethodDescriptor),
|
||||
connect.WithSchema(pingServiceMethods.ByName("Ping")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
@@ -88,10 +83,11 @@ type PingServiceHandler interface {
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewPingServiceHandler(svc PingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
pingServiceMethods := v1.File_ping_v1_services_proto.Services().ByName("PingService").Methods()
|
||||
pingServicePingHandler := connect.NewUnaryHandler(
|
||||
PingServicePingProcedure,
|
||||
svc.Ping,
|
||||
connect.WithSchema(pingServicePingMethodDescriptor),
|
||||
connect.WithSchema(pingServiceMethods.ByName("Ping")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ping.v1.PingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user