Compare commits
No commits in common. "a83abba4ce1d0eabd89a56bd0fd6e781b7482884" and "96f92132134240d175597fbde8a93d9b1d57acbc" have entirely different histories.
a83abba4ce
...
96f9213213
4
TODO.md
4
TODO.md
@ -1,10 +1,8 @@
|
|||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- [ ] Finish implementing GRPC service support
|
- [x] Pattern for extending config
|
||||||
- [ ] Expand tracing
|
|
||||||
|
|
||||||
## Done
|
## Done
|
||||||
- [x] Unit tests
|
- [x] Unit tests
|
||||||
- [x] Pattern for extending config
|
|
||||||
- [x] HTTP Logging Middleware
|
- [x] HTTP Logging Middleware
|
||||||
- [x] Fix panic with OTEL disabled
|
- [x] Fix panic with OTEL disabled
|
||||||
|
@ -1,15 +1,44 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"go.opentelemetry.io/otel/codes"
|
"go.opentelemetry.io/otel/codes"
|
||||||
|
"go.opentelemetry.io/otel/trace"
|
||||||
|
|
||||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
||||||
|
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/otel"
|
||||||
|
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *App) Done() <-chan any {
|
type App struct {
|
||||||
|
AppContext context.Context
|
||||||
|
HTTP *AppHTTP
|
||||||
|
cfg *config.AppConfig
|
||||||
|
l *zerolog.Logger
|
||||||
|
tracer trace.Tracer
|
||||||
|
shutdownFuncs []shutdownFunc
|
||||||
|
appDone chan interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
type AppHTTP struct {
|
||||||
|
Funcs []srv.HTTPFunc // Handle funcs to serve
|
||||||
|
Middleware []http.Handler // Optional middleware. Next handler called by app framework.
|
||||||
|
HealthChecks []srv.HealthCheckFunc // Health-check functions to be called by health endpoint
|
||||||
|
CustomListener net.Listener // Optional listener for http server
|
||||||
|
httpDone <-chan interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
type (
|
||||||
|
healthCheckFunc func(context.Context) error
|
||||||
|
shutdownFunc func(context.Context) error
|
||||||
|
)
|
||||||
|
|
||||||
|
func (a *App) Done() <-chan interface{} {
|
||||||
return a.appDone
|
return a.appDone
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,8 +51,8 @@ func (a *App) MustRun() {
|
|||||||
a.cfg = config.MustFromCtx(a.AppContext)
|
a.cfg = config.MustFromCtx(a.AppContext)
|
||||||
a.l = zerolog.Ctx(a.AppContext)
|
a.l = zerolog.Ctx(a.AppContext)
|
||||||
a.shutdownFuncs = make([]shutdownFunc, 0)
|
a.shutdownFuncs = make([]shutdownFunc, 0)
|
||||||
a.appDone = make(chan any)
|
a.appDone = make(chan interface{})
|
||||||
a.HTTP.httpDone = make(chan any)
|
a.HTTP.httpDone = make(chan interface{})
|
||||||
|
|
||||||
if len(a.HTTP.Funcs) < 1 {
|
if len(a.HTTP.Funcs) < 1 {
|
||||||
a.l.Warn().Msg("no http funcs provided, only serving health and metrics")
|
a.l.Warn().Msg("no http funcs provided, only serving health and metrics")
|
||||||
@ -31,17 +60,11 @@ func (a *App) MustRun() {
|
|||||||
|
|
||||||
// Start OTEL
|
// Start OTEL
|
||||||
a.initOTEL()
|
a.initOTEL()
|
||||||
ctx, initSpan := a.tracer.Start(a.AppContext, "init")
|
var initSpan trace.Span
|
||||||
defer initSpan.End()
|
_, initSpan = a.tracer.Start(a.AppContext, "init")
|
||||||
|
|
||||||
// Start HTTP
|
// Start HTTP
|
||||||
if err := a.initHTTP(ctx); err != nil {
|
a.initHTTP()
|
||||||
initSpan.RecordError(err)
|
|
||||||
initSpan.SetStatus(codes.Error, err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start GRPC
|
|
||||||
a.initGRPC()
|
|
||||||
|
|
||||||
// Monitor app lifecycle
|
// Monitor app lifecycle
|
||||||
go a.run()
|
go a.run()
|
||||||
@ -53,4 +76,26 @@ func (a *App) MustRun() {
|
|||||||
Str("logLevel", a.cfg.Logging.Level).
|
Str("logLevel", a.cfg.Logging.Level).
|
||||||
Msg("app initialized")
|
Msg("app initialized")
|
||||||
initSpan.SetStatus(codes.Ok, "")
|
initSpan.SetStatus(codes.Ok, "")
|
||||||
|
initSpan.End()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *App) initHTTP() {
|
||||||
|
var httpShutdown shutdownFunc
|
||||||
|
httpShutdown, a.HTTP.httpDone = srv.MustInitHTTPServer(
|
||||||
|
&srv.HTTPServerOpts{
|
||||||
|
Ctx: a.AppContext,
|
||||||
|
HandleFuncs: a.HTTP.Funcs,
|
||||||
|
Middleware: a.HTTP.Middleware,
|
||||||
|
HealthCheckFuncs: a.HTTP.HealthChecks,
|
||||||
|
CustomListener: a.HTTP.CustomListener,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
a.shutdownFuncs = append(a.shutdownFuncs, httpShutdown)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *App) initOTEL() {
|
||||||
|
var otelShutdown shutdownFunc
|
||||||
|
a.AppContext, otelShutdown = otel.Init(a.AppContext)
|
||||||
|
a.shutdownFuncs = append(a.shutdownFuncs, otelShutdown)
|
||||||
|
a.tracer = otel.MustTracerFromCtx(a.AppContext)
|
||||||
}
|
}
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
|
||||||
"go.opentelemetry.io/otel/codes"
|
|
||||||
|
|
||||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/otel"
|
|
||||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (a *App) initGRPC() {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *App) initHTTP(ctx context.Context) error {
|
|
||||||
var err error
|
|
||||||
var httpShutdown shutdownFunc
|
|
||||||
|
|
||||||
_, span := a.tracer.Start(ctx, "init.http")
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
span.SetAttributes(
|
|
||||||
attribute.Int("numHTTPFuncs", len(a.HTTP.Funcs)),
|
|
||||||
attribute.Int("numHTTPMiddlewares", len(a.HTTP.Middleware)),
|
|
||||||
attribute.Int("numHTTPHealthChecks", len(a.HTTP.HealthChecks)),
|
|
||||||
)
|
|
||||||
|
|
||||||
httpShutdown, a.HTTP.httpDone, err = srv.InitHTTPServer(
|
|
||||||
&srv.HTTPServerOpts{
|
|
||||||
Ctx: a.AppContext,
|
|
||||||
HandleFuncs: a.HTTP.Funcs,
|
|
||||||
Middleware: a.HTTP.Middleware,
|
|
||||||
HealthCheckFuncs: a.HTTP.HealthChecks,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
a.shutdownFuncs = append(a.shutdownFuncs, httpShutdown)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
span.RecordError(err)
|
|
||||||
span.SetStatus(codes.Error, err.Error())
|
|
||||||
} else {
|
|
||||||
span.SetStatus(codes.Ok, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *App) initOTEL() {
|
|
||||||
var otelShutdown shutdownFunc
|
|
||||||
a.AppContext, otelShutdown = otel.Init(a.AppContext)
|
|
||||||
a.shutdownFuncs = append(a.shutdownFuncs, otelShutdown)
|
|
||||||
a.tracer = otel.MustTracerFromCtx(a.AppContext)
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/rs/zerolog"
|
|
||||||
"go.opentelemetry.io/otel/trace"
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
|
|
||||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
|
||||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv"
|
|
||||||
)
|
|
||||||
|
|
||||||
type App struct {
|
|
||||||
AppContext context.Context
|
|
||||||
HTTP *AppHTTP
|
|
||||||
GRPC *AppGRPC
|
|
||||||
cfg *config.AppConfig
|
|
||||||
l *zerolog.Logger
|
|
||||||
tracer trace.Tracer
|
|
||||||
shutdownFuncs []shutdownFunc
|
|
||||||
appDone chan any
|
|
||||||
}
|
|
||||||
|
|
||||||
type AppGRPC struct {
|
|
||||||
Services []*GRPCService
|
|
||||||
GRPCOpts []grpc.ServerOption
|
|
||||||
}
|
|
||||||
|
|
||||||
type GRPCService struct {
|
|
||||||
Name string // Descriptive name of service
|
|
||||||
Type *grpc.ServiceDesc // Type (from protoc generated code)
|
|
||||||
Service any // Implementation of GRPCService.Type (ptr)
|
|
||||||
}
|
|
||||||
|
|
||||||
type AppHTTP struct {
|
|
||||||
Funcs []srv.HTTPFunc
|
|
||||||
Middleware []http.Handler
|
|
||||||
HealthChecks []srv.HealthCheckFunc
|
|
||||||
httpDone <-chan any
|
|
||||||
}
|
|
||||||
|
|
||||||
type (
|
|
||||||
healthCheckFunc func(context.Context) error
|
|
||||||
shutdownFunc func(context.Context) error
|
|
||||||
)
|
|
@ -1,13 +1,32 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
// Default Settings
|
// Default Settings
|
||||||
var DefaultConfig = &AppConfig{
|
var DefaultConfig = &AppConfig{
|
||||||
Environment: "development",
|
Environment: "development",
|
||||||
Version: getVersion(),
|
Version: getVersion(),
|
||||||
Logging: defaultLoggingConfig,
|
Logging: &LogConfig{
|
||||||
HTTP: defaultHTTPConfig,
|
Enabled: true,
|
||||||
OTEL: defaultOTELConfig,
|
Level: "info",
|
||||||
GRPC: defaultGRPCConfig,
|
Format: LogFormatJSON,
|
||||||
|
Output: "stderr",
|
||||||
|
TimeFormat: TimeFormatLong,
|
||||||
|
},
|
||||||
|
HTTP: &HTTPConfig{
|
||||||
|
Listen: "127.0.0.1:8080",
|
||||||
|
LogRequests: false,
|
||||||
|
ReadTimeout: "10s",
|
||||||
|
WriteTimeout: "10s",
|
||||||
|
IdleTimeout: "1m",
|
||||||
|
},
|
||||||
|
OTEL: &OTELConfig{
|
||||||
|
Enabled: true,
|
||||||
|
PrometheusEnabled: true,
|
||||||
|
PrometheusPath: "/metrics",
|
||||||
|
StdoutEnabled: false,
|
||||||
|
MetricIntervalSecs: 30,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type AppConfig struct {
|
type AppConfig struct {
|
||||||
@ -20,5 +39,58 @@ type AppConfig struct {
|
|||||||
Logging *LogConfig `yaml:"logging,omitempty"`
|
Logging *LogConfig `yaml:"logging,omitempty"`
|
||||||
HTTP *HTTPConfig `yaml:"http,omitempty"`
|
HTTP *HTTPConfig `yaml:"http,omitempty"`
|
||||||
OTEL *OTELConfig `yaml:"otel,omitempty"`
|
OTEL *OTELConfig `yaml:"otel,omitempty"`
|
||||||
GRPC *GRPCConfig `yaml:"grpc,omitempty"`
|
}
|
||||||
|
|
||||||
|
// Logging Configuration
|
||||||
|
type LogConfig struct {
|
||||||
|
Enabled bool `yaml:"enabled,omitempty" env:"APP_LOG_ENABLED"`
|
||||||
|
Level string `yaml:"level,omitempty" env:"APP_LOG_LEVEL"`
|
||||||
|
Format LogFormat `yaml:"format,omitempty" env:"APP_LOG_FORMAT"`
|
||||||
|
Output LogOutput `yaml:"output,omitempty" env:"APP_LOG_OUTPUT"`
|
||||||
|
TimeFormat TimeFormat `yaml:"timeFormat,omitempty" env:"APP_LOG_TIME_FORMAT"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LogFormat string
|
||||||
|
|
||||||
|
const (
|
||||||
|
LogFormatConsole LogFormat = "console"
|
||||||
|
LogFormatJSON LogFormat = "json"
|
||||||
|
)
|
||||||
|
|
||||||
|
type TimeFormat string
|
||||||
|
|
||||||
|
const (
|
||||||
|
TimeFormatShort TimeFormat = "short"
|
||||||
|
TimeFormatLong TimeFormat = "long"
|
||||||
|
TimeFormatUnix TimeFormat = "unix"
|
||||||
|
TimeFormatRFC3339 TimeFormat = "rfc3339"
|
||||||
|
TimeFormatOff TimeFormat = "off"
|
||||||
|
)
|
||||||
|
|
||||||
|
type LogOutput string
|
||||||
|
|
||||||
|
const (
|
||||||
|
LogOutputStdout LogOutput = "stdout"
|
||||||
|
LogOutputStderr LogOutput = "stderr"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HTTP Configuration
|
||||||
|
type HTTPConfig struct {
|
||||||
|
Listen string `yaml:"listen,omitempty" env:"APP_HTTP_LISTEN"`
|
||||||
|
LogRequests bool `yaml:"logRequests" env:"APP_HTTP_LOG_REQUESTS"`
|
||||||
|
ReadTimeout string `yaml:"readTimeout" env:"APP_HTTP_READ_TIMEOUT"` // Go duration (e.g. 10s)
|
||||||
|
WriteTimeout string `yaml:"writeTimeout" env:"APP_HTTP_WRITE_TIMEOUT"` // Go duration (e.g. 10s)
|
||||||
|
IdleTimeout string `yaml:"idleTimeout" env:"APP_HTTP_IDLE_TIMEOUT"` // Go duration (e.g. 10s)
|
||||||
|
rT *time.Duration
|
||||||
|
wT *time.Duration
|
||||||
|
iT *time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// OTEL Configuration
|
||||||
|
type OTELConfig struct {
|
||||||
|
Enabled bool `yaml:"enabled,omitempty" env:"APP_OTEL_ENABLED"`
|
||||||
|
PrometheusEnabled bool `yaml:"prometheusEnabled,omitempty" env:"APP_OTEL_PROMETHEUS_ENABLED"`
|
||||||
|
PrometheusPath string `yaml:"prometheusPath,omitempty" env:"APP_OTEL_PROMETHEUS_PATH"`
|
||||||
|
StdoutEnabled bool `yaml:"stdoutEnabled,omitempty" env:"APP_OTEL_STDOUT_ENABLED"`
|
||||||
|
MetricIntervalSecs int `yaml:"metricIntervalSecs,omitempty" env:"APP_OTEL_METRIC_INTERVAL_SECS"`
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
var defaultGRPCConfig = &GRPCConfig{
|
|
||||||
LogRequests: false,
|
|
||||||
EnableReflection: true,
|
|
||||||
EnableInstrumentation: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
type GRPCConfig struct {
|
|
||||||
Listen string `yaml:"listen" env:"APP_GRPC_LISTEN"`
|
|
||||||
LogRequests bool `yaml:"logRequests" env:"APP_GRPC_LOG_REQUESTS"`
|
|
||||||
EnableReflection bool `yaml:"enableReflection" env:"APP_GRPC_ENABLE_REFLECTION"`
|
|
||||||
EnableInstrumentation bool `yaml:"enableInstrumentation" env:"APP_GRPC_ENABLE_INSTRUMENTATION"` // requires OTEL
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
var defaultHTTPConfig = &HTTPConfig{
|
|
||||||
Listen: "127.0.0.1:8080",
|
|
||||||
LogRequests: false,
|
|
||||||
ReadTimeout: "10s",
|
|
||||||
WriteTimeout: "10s",
|
|
||||||
IdleTimeout: "1m",
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTTP Configuration
|
|
||||||
type HTTPConfig struct {
|
|
||||||
Listen string `yaml:"listen,omitempty" env:"APP_HTTP_LISTEN"`
|
|
||||||
LogRequests bool `yaml:"logRequests" env:"APP_HTTP_LOG_REQUESTS"`
|
|
||||||
ReadTimeout string `yaml:"readTimeout" env:"APP_HTTP_READ_TIMEOUT"` // Go duration (e.g. 10s)
|
|
||||||
WriteTimeout string `yaml:"writeTimeout" env:"APP_HTTP_WRITE_TIMEOUT"` // Go duration (e.g. 10s)
|
|
||||||
IdleTimeout string `yaml:"idleTimeout" env:"APP_HTTP_IDLE_TIMEOUT"` // Go duration (e.g. 10s)
|
|
||||||
rT *time.Duration
|
|
||||||
wT *time.Duration
|
|
||||||
iT *time.Duration
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
var defaultLoggingConfig = &LogConfig{
|
|
||||||
Enabled: true,
|
|
||||||
Level: "info",
|
|
||||||
Format: LogFormatJSON,
|
|
||||||
Output: "stderr",
|
|
||||||
TimeFormat: TimeFormatLong,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logging Configuration
|
|
||||||
type LogConfig struct {
|
|
||||||
Enabled bool `yaml:"enabled,omitempty" env:"APP_LOG_ENABLED"`
|
|
||||||
Level string `yaml:"level,omitempty" env:"APP_LOG_LEVEL"`
|
|
||||||
Format LogFormat `yaml:"format,omitempty" env:"APP_LOG_FORMAT"`
|
|
||||||
Output LogOutput `yaml:"output,omitempty" env:"APP_LOG_OUTPUT"`
|
|
||||||
TimeFormat TimeFormat `yaml:"timeFormat,omitempty" env:"APP_LOG_TIME_FORMAT"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LogFormat string
|
|
||||||
|
|
||||||
const (
|
|
||||||
LogFormatConsole LogFormat = "console"
|
|
||||||
LogFormatJSON LogFormat = "json"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TimeFormat string
|
|
||||||
|
|
||||||
const (
|
|
||||||
TimeFormatShort TimeFormat = "short"
|
|
||||||
TimeFormatLong TimeFormat = "long"
|
|
||||||
TimeFormatUnix TimeFormat = "unix"
|
|
||||||
TimeFormatRFC3339 TimeFormat = "rfc3339"
|
|
||||||
TimeFormatOff TimeFormat = "off"
|
|
||||||
)
|
|
||||||
|
|
||||||
type LogOutput string
|
|
||||||
|
|
||||||
const (
|
|
||||||
LogOutputStdout LogOutput = "stdout"
|
|
||||||
LogOutputStderr LogOutput = "stderr"
|
|
||||||
)
|
|
@ -1,18 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
var defaultOTELConfig = &OTELConfig{
|
|
||||||
Enabled: true,
|
|
||||||
PrometheusEnabled: true,
|
|
||||||
PrometheusPath: "/metrics",
|
|
||||||
StdoutEnabled: false,
|
|
||||||
MetricIntervalSecs: 30,
|
|
||||||
}
|
|
||||||
|
|
||||||
// OTEL Configuration
|
|
||||||
type OTELConfig struct {
|
|
||||||
Enabled bool `yaml:"enabled,omitempty" env:"APP_OTEL_ENABLED"`
|
|
||||||
PrometheusEnabled bool `yaml:"prometheusEnabled,omitempty" env:"APP_OTEL_PROMETHEUS_ENABLED"`
|
|
||||||
PrometheusPath string `yaml:"prometheusPath,omitempty" env:"APP_OTEL_PROMETHEUS_PATH"`
|
|
||||||
StdoutEnabled bool `yaml:"stdoutEnabled,omitempty" env:"APP_OTEL_STDOUT_ENABLED"`
|
|
||||||
MetricIntervalSecs int `yaml:"metricIntervalSecs,omitempty" env:"APP_OTEL_METRIC_INTERVAL_SECS"`
|
|
||||||
}
|
|
@ -130,19 +130,23 @@ func prepHTTPServer(opts *HTTPServerOpts) *http.Server {
|
|||||||
|
|
||||||
// Returns a shutdown func and a done channel if the
|
// Returns a shutdown func and a done channel if the
|
||||||
// server aborts abnormally. Panics on error.
|
// server aborts abnormally. Panics on error.
|
||||||
func InitHTTPServer(opts *HTTPServerOpts) (
|
func MustInitHTTPServer(opts *HTTPServerOpts) (
|
||||||
func(context.Context) error, <-chan any, error,
|
func(context.Context) error, <-chan interface{},
|
||||||
) {
|
) {
|
||||||
return initHTTPServer(opts)
|
shutdownFunc, doneChan, err := InitHTTPServer(opts)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return shutdownFunc, doneChan
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a shutdown func and a done channel if the
|
// Returns a shutdown func and a done channel if the
|
||||||
// server aborts abnormally. Returns error on failure to start
|
// server aborts abnormally. Returns error on failure to start
|
||||||
func initHTTPServer(opts *HTTPServerOpts) (
|
func InitHTTPServer(opts *HTTPServerOpts) (
|
||||||
func(context.Context) error, <-chan any, error,
|
func(context.Context) error, <-chan interface{}, error,
|
||||||
) {
|
) {
|
||||||
l := zerolog.Ctx(opts.Ctx)
|
l := zerolog.Ctx(opts.Ctx)
|
||||||
doneChan := make(chan any)
|
doneChan := make(chan interface{})
|
||||||
|
|
||||||
var server *http.Server
|
var server *http.Server
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user