Documentation ¶
Index ¶
- Constants
- Variables
- type Context
- type HandleOptionFunc
- type HandlerFunc
- type HandlerOption
- type Server
- func (s *Server) ListenAndServe(addr string) (listenAddr string, err error)
- func (s *Server) ListenAndServeTLS(addr string, certFile string, keyFile string) (listenAddr string, err error)
- func (s *Server) Listener() net.Listener
- func (s *Server) MustRegisterHandler(method string, pattern string, option *HandlerOption, funcs ...HandlerFunc)
Constants ¶
View Source
const ( DefaultMinDispatchInterval = 0 * time.Millisecond DefaultTimeout = 60 * time.Second )
Variables ¶
View Source
var (
ErrTooOften = errors.New("too often")
)
Functions ¶
This section is empty.
Types ¶
type HandleOptionFunc ¶
type HandleOptionFunc func(option *HandlerOption)
func WithMinDispatchInterval ¶
func WithMinDispatchInterval(minDispatchInterval time.Duration) HandleOptionFunc
func WithRequestQueued ¶
func WithRequestQueued(queued bool) HandleOptionFunc
func WithTimeout ¶
func WithTimeout(timeout time.Duration) HandleOptionFunc
type HandlerFunc ¶
type HandlerFunc = gin.HandlerFunc
func TraceRequestBody ¶
func TraceRequestBody(logger slog.ILogger) HandlerFunc
type HandlerOption ¶
type HandlerOption struct {
// contains filtered or unexported fields
}
func NewHandlerOption ¶
func NewHandlerOption(optionFuncs ...HandleOptionFunc) *HandlerOption
func (HandlerOption) MinDispatchInterval ¶
func (o HandlerOption) MinDispatchInterval() time.Duration
func (HandlerOption) Timeout ¶
func (o HandlerOption) Timeout() time.Duration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeTLS ¶
func (*Server) MustRegisterHandler ¶
func (s *Server) MustRegisterHandler(method string, pattern string, option *HandlerOption, funcs ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.