Documentation ¶
Index ¶
- Variables
- func IsMethod(r *http.Request, method ...string) bool
- func NewLimitItem(max int) *limitItem
- func WithFlush(w http.ResponseWriter) http.ResponseWriter
- func WithStatusCode(w http.ResponseWriter, code int)
- type Cache
- type Exprier
- func (t *Exprier) Check(key string) error
- func (t *Exprier) Disable()
- func (t *Exprier) Drop(key string)
- func (t *Exprier) Len() int
- func (t *Exprier) LoopCheck(key string, dru time.Duration, whenfail func(key string, e error)) (breakLoop func(), e error)
- func (t *Exprier) Reg(key string, dur time.Duration) (string, error)
- type Limits
- type Web
- type WebPath
- func (t *WebPath) GetConn(r *http.Request) net.Conn
- func (t *WebPath) Load(path string) (func(w http.ResponseWriter, r *http.Request), bool)
- func (t *WebPath) LoadPerfix(path string) (func(w http.ResponseWriter, r *http.Request), bool)
- func (t *WebPath) Store(path string, f func(w http.ResponseWriter, r *http.Request))
- type WebSync
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewLimitItem ¶ added in v0.27.16
func NewLimitItem(max int) *limitItem
func WithFlush ¶ added in v0.28.1
func WithFlush(w http.ResponseWriter) http.ResponseWriter
func WithStatusCode ¶ added in v0.27.16
func WithStatusCode(w http.ResponseWriter, code int)
Types ¶
type Cache ¶ added in v0.27.13
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Cache ¶ added in v0.27.15
func (t *Cache) Cache(key string, aliveDur time.Duration, w http.ResponseWriter) http.ResponseWriter
type Exprier ¶ added in v0.28.20240107072530
type Exprier struct { Max int // contains filtered or unexported fields }
type Limits ¶ added in v0.27.16
type Limits struct {
// contains filtered or unexported fields
}
func (*Limits) AddLimitItem ¶ added in v0.27.16
func (t *Limits) AddLimitItem(item *limitItem)
type WebPath ¶ added in v0.22.4
func (*WebPath) LoadPerfix ¶ added in v0.28.20231202144738
type WebSync ¶ added in v0.22.4
func NewSyncMap ¶ added in v0.22.1
Click to show internal directories.
Click to hide internal directories.