Documentation
¶
Index ¶
Constants ¶
View Source
const ( ReadTimeout = 5 * time.Second IdleTimeout = 60 * time.Second )
Variables ¶
View Source
var ConfigDefault = Config{ Listen: ":3000", Proxies: []string{}, WriteTimeout: 5 * time.Second, }
View Source
var Module = fx.Module( "http", fxutil.WithNamedLogger("http"), fx.Provide( New, NewServer, ), )
Functions ¶
func AsApiHandler ¶
func AsRootHandler ¶
func Run ¶
func Run(params RunServerParams) error
Types ¶
type ApiHanlder ¶
type Params ¶
type Params struct {
fx.In
Config Config
Logger *zap.Logger
ApiHandlers []ApiHanlder `group:"api-routes"`
RootHandlers []RootHanlder `group:"root-routes"`
LC fx.Lifecycle
}
type RootHanlder ¶
type RunServerParams ¶
Click to show internal directories.
Click to hide internal directories.