add grpc support
This commit is contained in:
23
pkg/srv/http/opts/http_config.go
Normal file
23
pkg/srv/http/opts/http_config.go
Normal file
@ -0,0 +1,23 @@
|
||||
package opts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type AppHTTP struct {
|
||||
Ctx context.Context
|
||||
Funcs []HTTPFunc
|
||||
Middleware []http.Handler
|
||||
HealthChecks []HealthCheckFunc
|
||||
CustomListener net.Listener
|
||||
HTTPDone <-chan any
|
||||
}
|
||||
|
||||
type HTTPFunc struct {
|
||||
Path string
|
||||
HandlerFunc http.HandlerFunc
|
||||
}
|
||||
|
||||
type HealthCheckFunc func(context.Context) error
|
Reference in New Issue
Block a user