add weather grpc
This commit is contained in:
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user