Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...Option) gin.HandlerFunc
New wraps a handler and aborts the process of the handler if the timeout is reached
Types ¶
type BufferPool ¶ added in v0.0.2
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool is Pool of *bytes.Buffer
func (*BufferPool) Get ¶ added in v0.0.2
func (p *BufferPool) Get() *bytes.Buffer
Get a bytes.Buffer pointer
func (*BufferPool) Put ¶ added in v0.0.2
func (p *BufferPool) Put(buf *bytes.Buffer)
Put a bytes.Buffer pointer to BufferPool
type Writer ¶ added in v0.0.2
type Writer struct { gin.ResponseWriter // contains filtered or unexported fields }
Writer is a writer with memory buffer
func NewWriter ¶ added in v0.0.2
func NewWriter(w gin.ResponseWriter, buf *bytes.Buffer) *Writer
NewWriter will return a timeout.Writer pointer
func (*Writer) FreeBuffer ¶ added in v0.0.2
func (w *Writer) FreeBuffer()
FreeBuffer will release buffer pointer
func (*Writer) WriteHeader ¶ added in v0.0.2
WriteHeader will write http status code
Click to show internal directories.
Click to hide internal directories.