add weather grpc

This commit is contained in:
2025-03-07 08:42:38 -05:00
parent 075902ecd8
commit 81676c5404
9 changed files with 68 additions and 23 deletions

View File

@ -7,7 +7,7 @@ import (
"go.opentelemetry.io/otel/codes"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/otel"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv"
srvhttp "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http"
)
func (a *App) initGRPC() {
@ -26,8 +26,8 @@ func (a *App) initHTTP(ctx context.Context) error {
attribute.Int("numHTTPHealthChecks", len(a.HTTP.HealthChecks)),
)
httpShutdown, a.HTTP.httpDone, err = srv.InitHTTPServer(
&srv.HTTPServerOpts{
httpShutdown, a.HTTP.httpDone, err = srvhttp.InitHTTPServer(
&srvhttp.HTTPServerOpts{
Ctx: a.AppContext,
HandleFuncs: a.HTTP.Funcs,
Middleware: a.HTTP.Middleware,

View File

@ -9,7 +9,7 @@ import (
"google.golang.org/grpc"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv"
srvhttp "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http"
)
type App struct {
@ -35,9 +35,9 @@ type GRPCService struct {
}
type AppHTTP struct {
Funcs []srv.HTTPFunc
Funcs []srvhttp.HTTPFunc
Middleware []http.Handler
HealthChecks []srv.HealthCheckFunc
HealthChecks []srvhttp.HealthCheckFunc
httpDone <-chan any
}