Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Kind is the kind of Fallback. Kind = constant.HTTPAccessLogFilter )
Variables ¶
This section is empty.
Functions ¶
func WriteToFile ¶
WriteToFile write message to access log file
Types ¶
type AccessLogConfig ¶
type AccessLogConfig struct {
OutPutPath string `yaml:"outPutPath" json:"outPutPath" mapstructure:"outPutPath" default:"console"`
}
access log config, enable default value true, outputpath default value console AccessLogConfig access log will out put into console
type AccessLogData ¶
type AccessLogData struct { AccessLogMsg string AccessLogConfig AccessLogConfig }
AccessLogData access log data
type AccessLogWriter ¶
type AccessLogWriter struct {
AccessLogDataChan chan AccessLogData
}
AccessLogWriter access log chan
func (*AccessLogWriter) Write ¶
func (alw *AccessLogWriter) Write()
Write write log into out put path
func (*AccessLogWriter) Writer ¶
func (alw *AccessLogWriter) Writer(accessLogData AccessLogData)
Writer writer msg into chan
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) Decode ¶
func (f *Filter) Decode(c *http.HttpContext) filter.FilterStatus
Decode process http context
func (*Filter) Encode ¶
func (f *Filter) Encode(c *http.HttpContext) filter.FilterStatus
type FilterFactory ¶
type FilterFactory struct {
// contains filtered or unexported fields
}
FilterFactory is http filter instance
func (*FilterFactory) Apply ¶
func (factory *FilterFactory) Apply() error
Apply init after config set
func (*FilterFactory) Config ¶
func (factory *FilterFactory) Config() interface{}
Config return config of filter
func (*FilterFactory) PrepareFilterChain ¶
func (factory *FilterFactory) PrepareFilterChain(ctx *http.HttpContext, chain filter.FilterChain) error
PrepareFilterChain prepare chain when http context init
Click to show internal directories.
Click to hide internal directories.