chore: update grpc router path
This commit is contained in:
parent
86f66eaa45
commit
f05e08a767
|
@ -4,6 +4,7 @@ import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.gitea.io/bots-proto-go/ping/v1/pingv1connect"
|
"code.gitea.io/bots-proto-go/ping/v1/pingv1connect"
|
||||||
|
@ -51,15 +52,17 @@ func New(endpoint string, opts ...Option) *HTTPClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
baseURL := strings.TrimRight(endpoint, "/") + "/api/bots"
|
||||||
|
|
||||||
return &HTTPClient{
|
return &HTTPClient{
|
||||||
PingServiceClient: pingv1connect.NewPingServiceClient(
|
PingServiceClient: pingv1connect.NewPingServiceClient(
|
||||||
cfg.httpClient,
|
cfg.httpClient,
|
||||||
endpoint,
|
baseURL,
|
||||||
cfg.opts...,
|
cfg.opts...,
|
||||||
),
|
),
|
||||||
RunnerServiceClient: runnerv1connect.NewRunnerServiceClient(
|
RunnerServiceClient: runnerv1connect.NewRunnerServiceClient(
|
||||||
cfg.httpClient,
|
cfg.httpClient,
|
||||||
endpoint,
|
baseURL,
|
||||||
cfg.opts...,
|
cfg.opts...,
|
||||||
),
|
),
|
||||||
endpoint: endpoint,
|
endpoint: endpoint,
|
||||||
|
|
Loading…
Reference in New Issue