Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #1

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions response_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ import (
// written to the client
type ResponseWriter interface {
http.ResponseWriter

// BytesWritten returns the number of bytes written to the client
BytesWritten() int64

// Status returns the HTTP status code that is being written to the client
Status() int

// StartTime returns the time when the downstream handler started processing
StartTime() time.Time

// EndTime returns the time when the downstream handler finished processing
// Calling this method before `End()` returns the zero time
EndTime() time.Time

// End is called when the downsteam handler has finished processing.
End()
}
Expand All @@ -26,6 +37,7 @@ type ResponseWriterBuilder interface {
Wrap(http.ResponseWriter, *http.Request, bool) ResponseWriter
}

// DefaultResponseWriterBuilder returns the default ResponseWriterBuilder
func DefaultResponseWriterBuilder() ResponseWriterBuilder {
return defaultResponseWriterBuilder{}
}
Expand Down
Loading