Documentation
¶
Index ¶
Constants ¶
View Source
const ( XForwardedProto = "X-Forwarded-Proto" XForwardedFor = "X-Forwarded-For" XForwardedHost = "X-Forwarded-Host" XForwardedPort = "X-Forwarded-Port" XForwardedServer = "X-Forwarded-Server" XForwardedURI = "X-Forwarded-Uri" XForwardedMethod = "X-Forwarded-Method" XForwardedTLSClientCert = "X-Forwarded-Tls-Client-Cert" XForwardedTLSClientCertInfo = "X-Forwarded-Tls-Client-Cert-Info" XRealIP = "X-Real-Ip" Connection = "Connection" Upgrade = "Upgrade" )
View Source
const StatusClientClosedRequest = 499
StatusClientClosedRequest non-standard HTTP status code for client disconnection.
View Source
const StatusClientClosedRequestText = "Client Closed Request"
StatusClientClosedRequestText non-standard HTTP status for client disconnection.
Variables ¶
View Source
var ( BufferPool = buffer.NewPool() // Get retrieves a buffer from the pool, creating one if necessary. GetBuffer = BufferPool.Get )
View Source
var (
BufPool = NewBufPool()
)
Functions ¶
func AcquireTimer ¶
AcquireTimer returns a time.Timer from the pool and updates it to send the current time on its channel after at least timeout.
The returned Timer may be returned to the pool with ReleaseTimer when no longer needed. This allows reducing GC load.
func EnsureLeadingSlash ¶
EnsureLeadingSlash makes sure str has lead slash
func NewBufPool ¶
func NewBufPool() *bufferPool
func ReleaseTimer ¶
ReleaseTimer returns the time.Timer acquired via AcquireTimer to the pool and prevents the Timer from firing.
Do not access the released time.Timer or read from it's channel otherwise data races may occur.
func StatusText ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.