Documentation ¶
Index ¶
- type RedisLogger
- func (RedisLogger) CaddyModule() caddy.ModuleInfo
- func (rl *RedisLogger) Cleanup() error
- func (rl *RedisLogger) Provision(ctx caddy.Context) error
- func (rl *RedisLogger) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (rl *RedisLogger) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (rl *RedisLogger) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisLogger ¶
type RedisLogger struct { RedisAddress string `json:"redis_address,omitempty"` RedisPassword string `json:"redis_password,omitempty"` RedisDB int `json:"redis_db,omitempty"` RedisKey string `json:"redis_key"` WithBody bool `json:"with_body,omitempty"` DialTimeout time.Duration `json:"dial_timeout,omitempty"` // 连接超时时间 ReadTimeout time.Duration `json:"read_timeout,omitempty"` // 读取超时时间 WriteTimeout time.Duration `json:"write_timeout,omitempty"` // 写入超时时间 MaxRetries int `json:"max_retries,omitempty"` // 最大重试次数 // contains filtered or unexported fields }
func (RedisLogger) CaddyModule ¶
func (RedisLogger) CaddyModule() caddy.ModuleInfo
func (*RedisLogger) Cleanup ¶
func (rl *RedisLogger) Cleanup() error
func (*RedisLogger) Provision ¶
func (rl *RedisLogger) Provision(ctx caddy.Context) error
Provision实现了caddy.Provisioner
func (*RedisLogger) ServeHTTP ¶
func (rl *RedisLogger) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP 实现了 caddyhttp.MiddlewareHandler
func (*RedisLogger) UnmarshalCaddyfile ¶
func (rl *RedisLogger) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile实现了caddyfile.Unmarshaler
Click to show internal directories.
Click to hide internal directories.