Skip to content

Commit

Permalink
Merge pull request #1 from lestrrat-go/docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
lestrrat authored Oct 12, 2024
2 parents 164600e + f3980ab commit 056531f
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 056531f

Please sign in to comment.