add grpc support
This commit is contained in:
@ -129,23 +129,19 @@ func prepHTTPServer(opts *HTTPServerOpts) *http.Server {
|
||||
|
||||
// Returns a shutdown func and a done channel if the
|
||||
// server aborts abnormally. Panics on error.
|
||||
func MustInitHTTPServer(opts *HTTPServerOpts) (
|
||||
func(context.Context) error, <-chan interface{},
|
||||
func InitHTTPServer(opts *HTTPServerOpts) (
|
||||
func(context.Context) error, <-chan any, error,
|
||||
) {
|
||||
shutdownFunc, doneChan, err := InitHTTPServer(opts)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return shutdownFunc, doneChan
|
||||
return initHTTPServer(opts)
|
||||
}
|
||||
|
||||
// Returns a shutdown func and a done channel if the
|
||||
// server aborts abnormally. Returns error on failure to start
|
||||
func InitHTTPServer(opts *HTTPServerOpts) (
|
||||
func(context.Context) error, <-chan interface{}, error,
|
||||
func initHTTPServer(opts *HTTPServerOpts) (
|
||||
func(context.Context) error, <-chan any, error,
|
||||
) {
|
||||
l := zerolog.Ctx(opts.Ctx)
|
||||
doneChan := make(chan interface{})
|
||||
doneChan := make(chan any)
|
||||
|
||||
var server *http.Server
|
||||
|
||||
|
Reference in New Issue
Block a user