2
0

feat: add RequestBandwidthTest field to FetchTaskResponse
All checks were successful
CI / build (push) Successful in 1s
Release / release (push) Successful in 2s

Regenerated from actions-proto-def with new field to support
on-demand bandwidth testing from Gitea admin UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
GitCaddy Dev
2026-01-11 15:15:10 +00:00
parent df1eee24dc
commit 72766671d4
6 changed files with 798 additions and 354 deletions

View File

@@ -37,6 +37,12 @@ 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)
@@ -51,12 +57,11 @@ 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(pingServiceMethods.ByName("Ping")),
connect.WithSchema(pingServicePingMethodDescriptor),
connect.WithClientOptions(opts...),
),
}
@@ -83,11 +88,10 @@ 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(pingServiceMethods.ByName("Ping")),
connect.WithSchema(pingServicePingMethodDescriptor),
connect.WithHandlerOptions(opts...),
)
return "/ping.v1.PingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {