Documentation ¶
Index ¶
- Variables
- func NewBytesCountReader(beresp *http.Response) io.ReadCloser
- func RoundMS(d time.Duration) float64
- func UpdateCustomAccessLogContext(req *http.Request, body hcl.Body)
- type AccessLog
- type BytesCountReader
- type Config
- type Fields
- type Level
- type RecorderInfo
- type RoundtripHandlerFunc
- type Stack
- type UpstreamLog
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ RequestHeaders: []string{"User-Agent", "Accept", "Referer"}, ResponseHeaders: []string{"Cache-Control", "Content-Encoding", "Content-Type", "Location"}, }
Functions ¶
func NewBytesCountReader ¶ added in v1.9.0
func NewBytesCountReader(beresp *http.Response) io.ReadCloser
NewBytesCountReader just counts the raw read bytes from given response body for logging purposes.
func UpdateCustomAccessLogContext ¶ added in v1.7.0
Types ¶
type AccessLog ¶
type AccessLog struct {
// contains filtered or unexported fields
}
func NewAccessLog ¶
func NewAccessLog(c *Config, logger logrus.FieldLogger) *AccessLog
type BytesCountReader ¶ added in v1.9.0
type BytesCountReader struct {
// contains filtered or unexported fields
}
func (*BytesCountReader) Close ¶ added in v1.9.0
func (b *BytesCountReader) Close() error
type RecorderInfo ¶
type RoundtripHandlerFunc ¶
type RoundtripHandlerFunc http.HandlerFunc
func (RoundtripHandlerFunc) ServeHTTP ¶
func (f RoundtripHandlerFunc) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type UpstreamLog ¶
type UpstreamLog struct {
// contains filtered or unexported fields
}
func NewUpstreamLog ¶
func NewUpstreamLog(log *logrus.Entry, next http.RoundTripper, ignoreProxyEnv bool) *UpstreamLog
func (*UpstreamLog) LogEntry ¶
func (u *UpstreamLog) LogEntry() *logrus.Entry
func (*UpstreamLog) Value ¶ added in v1.9.0
func (u *UpstreamLog) Value() cty.Value
Source Files ¶
Click to show internal directories.
Click to hide internal directories.