Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶ added in v0.3.5
type Result struct { StatusCode int StatusMessage []byte RewriteURI []byte RedirectURI []byte AppendQueryString bool Handler string Filters util.StringSet RouteIndex int }
Result represents a result of routing.
func AcquireResult ¶ added in v0.3.5
func AcquireResult() *Result
AcquireResult returns an empty Result object from the pool.
The returned Result may be returned to the pool with Release when no longer needed. This allows reducing GC load.
func (*Result) RedirectURIWithQueryString ¶ added in v0.3.5
func (r *Result) RedirectURIWithQueryString(ctx *fasthttp.RequestCtx) []byte
RedirectURIWithQueryString returns r.RedirectURI with queryString.
func (*Result) Release ¶ added in v0.3.5
func (r *Result) Release()
Release returns the object acquired via AcquireResult to the pool.
Do not access the released Result object, otherwise data races may occur.
func (*Result) RewriteURIWithQueryString ¶ added in v0.3.5
func (r *Result) RewriteURIWithQueryString(ctx *fasthttp.RequestCtx) []byte
RewriteURIWithQueryString returns r.RewriteURI with queryString.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route represents a route settings that can be used to match requested URLs.
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
Routes represents a list of routes that can be used to match requested URLs.
func (*Routes) CachedRoute ¶
CachedRoute provides Read-Through caching for rs.Route if the cache is enabled.
func (*Routes) CachedRouteCtx ¶
func (rs *Routes) CachedRouteCtx(ctx *fasthttp.RequestCtx, off int) *Result
CachedRouteCtx provides Read-Through caching for rs.Route if the cache is enabled.