Documentation
¶
Index ¶
- type HTTPLog
- func (hl *HTTPLog) Done()
- func (hl *HTTPLog) GetKeyStr() string
- func (hl *HTTPLog) GetKeyStrDevice(device int) string
- func (hl *HTTPLog) Header() http.Header
- func (hl HTTPLog) MarshalJSON() []byte
- func (hl HTTPLog) MarshalString() string
- func (hl *HTTPLog) Write(b []byte) (int, error)
- func (hl *HTTPLog) WriteHeader(statusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPLog ¶
type HTTPLog struct { Time time.Time ClientIP string BackendIP string Proto string TLS bool Method string StatusCode int Schema string Host string User string URL string UserAgent string Cookies int RespTTFMS float64 RespTimeMS float64 ReqBytes int RespBytes int HIT bool RateLimit bool Device int CustomTags []string // contains filtered or unexported fields }
func New ¶
func New(r *http.Request, w http.ResponseWriter, fnHeaders func(w http.ResponseWriter) []string) *HTTPLog
func (*HTTPLog) GetKeyStr ¶
GetKeyStr return a uniq string for each url IMPORTANT: This is the key of the cache engine, if this do not generate the correct string will fuck the cache
func (*HTTPLog) GetKeyStrDevice ¶
func (HTTPLog) MarshalJSON ¶
func (HTTPLog) MarshalString ¶
func (*HTTPLog) WriteHeader ¶
Click to show internal directories.
Click to hide internal directories.