Documentation ¶
Overview ¶
Radix tree implementation below is a based on the original work by Armon Dadgar in https://github.com/armon/go-radix/blob/master/radix.go (MIT licensed). It's been heavily modified for use as a HTTP routing tree.
Index ¶
- Constants
- Variables
- func DefaultSkipper(c *Context) bool
- func Fresh(reqHeader http.Header, resHeader http.Header) bool
- func GetClientIP(req *http.Request) string
- func GetRealIP(req *http.Request) string
- func GetRemoteAddr(req *http.Request) string
- func IsIntranet(ip string) bool
- func NewMultipartForm() *multipartForm
- func ReadAllInitCap(r io.Reader, initCap int) ([]byte, error)
- func ReadAllToBuffer(r io.Reader, buffer *bytes.Buffer) error
- type AtomicSignedKeys
- type BeforeListener
- type BufferPool
- type Context
- func (c *Context) AddCookie(cookie *http.Cookie)
- func (c *Context) AddHeader(key, value string)
- func (c *Context) AddRequestHeader(key, value string)
- func (c *Context) AddSignedCookie(cookie *http.Cookie)
- func (c *Context) CacheMaxAge(age time.Duration, sMaxAge ...time.Duration)
- func (c *Context) ClientIP() string
- func (c *Context) Context() context.Context
- func (c *Context) Cookie(name string) (*http.Cookie, error)
- func (c *Context) Created(body interface{})
- func (c *Context) Deadline() (deadline time.Time, ok bool)
- func (c *Context) DisableReuse()
- func (c *Context) Done() <-chan struct{}
- func (c *Context) Elton() *Elton
- func (c *Context) Err() error
- func (c *Context) Get(key interface{}) (interface{}, bool)
- func (c *Context) GetBool(key interface{}) bool
- func (c *Context) GetDuration(key interface{}) time.Duration
- func (c *Context) GetFloat32(key interface{}) float32
- func (c *Context) GetFloat64(key interface{}) float64
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetInt(key interface{}) int
- func (c *Context) GetInt64(key interface{}) int64
- func (c *Context) GetRequestHeader(key string) string
- func (c *Context) GetSignedCookie(name string) (*http.Cookie, int, error)
- func (c *Context) GetString(key interface{}) string
- func (c *Context) GetStringSlice(key interface{}) []string
- func (c *Context) GetTime(key interface{}) time.Time
- func (c *Context) GetTrace() *Trace
- func (c *Context) HTML(html string)
- func (c *Context) Header() http.Header
- func (c *Context) IsReaderBody() bool
- func (c *Context) MergeHeader(h http.Header)
- func (c *Context) NewTrace() *Trace
- func (c *Context) NoCache()
- func (c *Context) NoContent()
- func (c *Context) NoStore()
- func (c *Context) NotModified()
- func (c *Context) Param(name string) string
- func (c *Context) Pass(another *Elton)
- func (c *Context) Pipe(r io.Reader) (int64, error)
- func (c *Context) PrivateCacheMaxAge(age time.Duration)
- func (c *Context) Push(target string, opts *http.PushOptions) error
- func (c *Context) Query() map[string]string
- func (c *Context) QueryParam(name string) string
- func (c *Context) ReadFile(key string) ([]byte, *multipart.FileHeader, error)
- func (c *Context) RealIP() string
- func (c *Context) Redirect(code int, url string) error
- func (c *Context) RemoteAddr() string
- func (c *Context) Reset()
- func (c *Context) ResetHeader()
- func (c *Context) SendFile(file string) error
- func (c *Context) ServerTiming(traceInfos TraceInfos, prefix string)
- func (c *Context) Set(key, value interface{})
- func (c *Context) SetContentTypeByExt(file string)
- func (c *Context) SetHeader(key, value string)
- func (c *Context) SetRequestHeader(key, value string)
- func (c *Context) SignedCookie(name string) (*http.Cookie, error)
- func (c *Context) Value(key interface{}) interface{}
- func (c *Context) WithContext(ctx context.Context) *Context
- func (c *Context) Write(buf []byte) (int, error)
- func (c *Context) WriteHeader(statusCode int)
- type ContextKey
- type DoneListener
- type Elton
- func (e *Elton) ALL(path string, handlerList ...Handler) *Elton
- func (e *Elton) AddGroup(groups ...*Group) *Elton
- func (e *Elton) Close() error
- func (e *Elton) Closing() bool
- func (e *Elton) DELETE(path string, handlerList ...Handler) *Elton
- func (e *Elton) EmitError(c *Context, err error) *Elton
- func (e *Elton) EmitTrace(c *Context, infos TraceInfos) *Elton
- func (e *Elton) GET(path string, handlerList ...Handler) *Elton
- func (e *Elton) GetFunctionName(fn interface{}) string
- func (e *Elton) GetRouters() []RouterInfo
- func (e *Elton) GetStatus() int32
- func (e *Elton) GracefulClose(delay time.Duration) error
- func (e *Elton) HEAD(path string, handlerList ...Handler) *Elton
- func (e *Elton) Handle(method, path string, handlerList ...Handler) *Elton
- func (e *Elton) ListenAndServe(addr string) error
- func (e *Elton) ListenAndServeTLS(addr, certFile, keyFile string) error
- func (e *Elton) Multi(methods []string, path string, handlerList ...Handler) *Elton
- func (e *Elton) OPTIONS(path string, handlerList ...Handler) *Elton
- func (e *Elton) OnBefore(ln BeforeListener) *Elton
- func (e *Elton) OnDone(ln DoneListener) *Elton
- func (e *Elton) OnError(ln ErrorListener) *Elton
- func (e *Elton) OnTrace(ln TraceListener) *Elton
- func (e *Elton) PATCH(path string, handlerList ...Handler) *Elton
- func (e *Elton) POST(path string, handlerList ...Handler) *Elton
- func (e *Elton) PUT(path string, handlerList ...Handler) *Elton
- func (e *Elton) Pre(handlerList ...PreHandler) *Elton
- func (e *Elton) Running() bool
- func (e *Elton) Serve(l net.Listener) error
- func (e *Elton) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- func (e *Elton) SetFunctionName(fn interface{}, name string)
- func (e *Elton) Shutdown() error
- func (e *Elton) TRACE(path string, handlerList ...Handler) *Elton
- func (e *Elton) Use(handlerList ...Handler) *Elton
- func (e *Elton) UseWithName(handler Handler, name string) *Elton
- type EndpointHandler
- type ErrorHandler
- type ErrorListener
- type GenerateID
- type Group
- func (g *Group) ALL(path string, handlerList ...Handler)
- func (g *Group) DELETE(path string, handlerList ...Handler)
- func (g *Group) GET(path string, handlerList ...Handler)
- func (g *Group) HEAD(path string, handlerList ...Handler)
- func (g *Group) Multi(methods []string, path string, handlerList ...Handler)
- func (g *Group) OPTIONS(path string, handlerList ...Handler)
- func (g *Group) PATCH(path string, handlerList ...Handler)
- func (g *Group) POST(path string, handlerList ...Handler)
- func (g *Group) PUT(path string, handlerList ...Handler)
- func (g *Group) TRACE(path string, handlerList ...Handler)
- type HTMLTemplate
- type Handler
- type PreHandler
- type RWMutexSignedKeys
- type ReadFile
- type RouteParams
- type Router
- type RouterInfo
- type SignedKeysGenerator
- type SimpleSignedKeys
- type Skipper
- type TemplateParser
- type TemplateParsers
- type Trace
- type TraceInfo
- type TraceInfos
- type TraceListener
Constants ¶
const ( // ReuseContextEnabled resuse context enabled ReuseContextEnabled int32 = iota // ReuseContextDisabled reuse context disabled ReuseContextDisabled )
const ( // ErrCategory elton category ErrCategory = "elton" // HeaderXForwardedFor x-forwarded-for HeaderXForwardedFor = "X-Forwarded-For" // HeaderXRealIP x-real-ip HeaderXRealIP = "X-Real-Ip" // HeaderSetCookie Set-Cookie HeaderSetCookie = "Set-Cookie" // HeaderLocation Location HeaderLocation = "Location" // HeaderContentType Content-Type HeaderContentType = "Content-Type" // HeaderAuthorization Authorization HeaderAuthorization = "Authorization" // HeaderWWWAuthenticate WWW-Authenticate HeaderWWWAuthenticate = "WWW-Authenticate" // HeaderCacheControl Cache-Control HeaderCacheControl = "Cache-Control" // HeaderETag ETag HeaderETag = "ETag" // HeaderLastModified last modified HeaderLastModified = "Last-Modified" // HeaderContentEncoding content encoding HeaderContentEncoding = "Content-Encoding" // HeaderContentLength content length HeaderContentLength = "Content-Length" // HeaderIfModifiedSince if modified since HeaderIfModifiedSince = "If-Modified-Since" // HeaderIfNoneMatch if none match HeaderIfNoneMatch = "If-None-Match" // HeaderAcceptEncoding accept encoding HeaderAcceptEncoding = "Accept-Encoding" // HeaderServerTiming server timing HeaderServerTiming = "Server-Timing" // HeaderTransferEncoding transfer encoding HeaderTransferEncoding = "Transfer-Encoding" // MinRedirectCode min redirect code MinRedirectCode = 300 // MaxRedirectCode max redirect code MaxRedirectCode = 308 // MIMETextPlain text plain MIMETextPlain = "text/plain; charset=utf-8" // MIMEApplicationJSON application json MIMEApplicationJSON = "application/json; charset=utf-8" // MIMEBinary binary data MIMEBinary = "application/octet-stream" // Gzip gzip compress Gzip = "gzip" // Br brotli compress Br = "br" // Zstd zstd compress Zstd = "zstd" )
const ( // StatusRunning running status StatusRunning = iota // StatusClosing closing status StatusClosing // StatusClosed closed status StatusClosed )
const (
// SignedCookieSuffix signed cookie suffix
SignedCookieSuffix = ".sig"
)
Variables ¶
var ( // ErrInvalidRedirect invalid redirect ErrInvalidRedirect = &hes.Error{ StatusCode: 400, Message: "invalid redirect", Category: ErrCategory, } // ErrNilResponse nil response ErrNilResponse = &hes.Error{ StatusCode: 500, Message: "nil response", Category: ErrCategory, } // ErrNotSupportPush not support http push ErrNotSupportPush = &hes.Error{ StatusCode: 500, Message: "not support http push", Category: ErrCategory, } // ErrFileNotFound file not found ErrFileNotFound = &hes.Error{ StatusCode: 404, Message: "file not found", Category: ErrCategory, } )
var ( // ServerTimingDur server timing dur ServerTimingDur = []byte(";dur=") // ServerTimingDesc server timing desc ServerTimingDesc = []byte(`;desc="`) // ServerTimingEnd server timing end ServerTimingEnd = []byte(`"`) )
var DefaultTemplateParsers = NewTemplateParsers()
var (
ErrSignKeyIsNil = hes.New("keys for sign cookie can't be nil")
)
Functions ¶
func Fresh ¶ added in v1.4.1
Fresh returns fresh status by judget request header and response header
func GetClientIP ¶
GetClientIP returns the client ip of request, it will get ip from x-forwarded-for from request header and get the first public ip, if not exists then it will get ip from x-real-ip from request header, if not exists then it will use remote addr.
func GetRealIP ¶
GetRealIP returns the real ip of request, it will get ip from x-forwarded-for from request header, if not exists then it will get ip from x-real-ip from request header, if not exists then it will use remote addr.
func GetRemoteAddr ¶
GetRemoteAddr returns the remote addr of request
func IsIntranet ¶ added in v1.2.5
IsIntranet judges whether the ip is intranet
func NewMultipartForm ¶ added in v1.10.0
func NewMultipartForm() *multipartForm
NewMultipartForm returns a new multipart form, the form data will be saved as tmp file for less memory.
func ReadAllInitCap ¶ added in v1.8.2
copy from io.ReadAll ReadAll reads from r until an error or EOF and returns the data it read. A successful call returns err == nil, not err == EOF. Because ReadAll is defined to read from src until EOF, it does not treat an EOF from Read as an error to be reported.
func ReadAllToBuffer ¶ added in v1.8.4
ReadAllToBuffer reader from r util an error or EOF and write data to buffer. A successful call returns err == nil, not err == EOF. Because ReadAll is defined to read from src until EOF, it does not treat an EOF from Read as an error to be reported.
Types ¶
type AtomicSignedKeys ¶
type AtomicSignedKeys struct {
// contains filtered or unexported fields
}
AtomicSignedKeys atomic toggle signed keys
func (*AtomicSignedKeys) GetKeys ¶
func (atSk *AtomicSignedKeys) GetKeys() []string
GetKeys returns the key list of atomic signed keys
func (*AtomicSignedKeys) SetKeys ¶
func (atSk *AtomicSignedKeys) SetKeys(values []string)
SetKeys sets the key list of atomic signed keys
type BeforeListener ¶ added in v1.8.4
type BeforeListener func(*Context)
BeforeListener before request handle listener
type BufferPool ¶ added in v1.8.4
A BufferPool is an interface for getting and returning temporary buffer
func NewBufferPool ¶ added in v1.8.4
func NewBufferPool(initCap int) BufferPool
NewBufferPool creates a buffer pool, if the init cap gt 0, the buffer will be init with cap size
type Context ¶
type Context struct { Request *http.Request Response http.ResponseWriter // Committed commit the data to response, when it's true, the response has been sent. // If using custom response handler, please set it true. Committed bool // ID context id, using unique string function to generate it. ID string // Route route path, it's equal to the http router path with params. Route string // Next next function, it will be auto generated. Next func() error // Params route params Params *RouteParams // StatusCode http response's status code, default is 0 which will be handle as 200 StatusCode int // Body http response's body, which should be converted to bytes by responder middleware. // JSON response middleware, xml response middleware and so on. Body interface{} // BodyBuffer http response's body buffer, it should be set by responder middleware. BodyBuffer *bytes.Buffer // RequestBody http request body, which should be converted by request body parser middleware. RequestBody []byte // contains filtered or unexported fields }
Context elton context
func NewContext ¶
func NewContext(resp http.ResponseWriter, req *http.Request) *Context
NewContext return a new context
func (*Context) AddHeader ¶
AddHeader adds the key/value to response header. It appends to any existing value of the key.
func (*Context) AddRequestHeader ¶
AddRequestHeader adds the key/value to http header. It appends to any existing value of the key.
func (*Context) AddSignedCookie ¶
AddSignedCookie adds cookie to the response, it will also add a signed cookie
func (*Context) CacheMaxAge ¶
CacheMaxAge sets `Cache-Control: public, max-age=MaxAge, s-maxage=SMaxAge` to the http response header. If sMaxAge is not empty, it will use the first duration as SMaxAge
func (*Context) ClientIP ¶
ClientIP returns the client ip of request, it will get ip from x-forwared-for from request header and get the first public ip, if not exists then it will get ip from x-real-ip from request header, if not exists then it will use remote addr.
func (*Context) Created ¶
func (c *Context) Created(body interface{})
Created sets the body to response and set the status to 201
func (*Context) DisableReuse ¶
func (c *Context) DisableReuse()
DisableReuse sets the context disable reuse
func (*Context) GetDuration ¶ added in v0.3.0
GetDuration returns duration from context
func (*Context) GetFloat32 ¶ added in v0.3.0
GetFloat32 returns float32 value from context
func (*Context) GetFloat64 ¶ added in v0.3.0
GetFloat64 returns float64 value from context
func (*Context) GetRequestHeader ¶
GetRequestHeader returns header value from http request
func (*Context) GetSignedCookie ¶
GetSignedCookie returns signed cookie from http request
func (*Context) GetStringSlice ¶ added in v0.3.0
GetStringSlice returns string slice from context
func (*Context) GetTrace ¶ added in v1.7.0
GetTrace get trace from context, if context without trace, new trace will be created.
func (*Context) IsReaderBody ¶
IsReaderBody judgets whether body is reader
func (*Context) MergeHeader ¶ added in v1.1.1
MergeHeader merges http header to response header
func (*Context) NoCache ¶
func (c *Context) NoCache()
NoCache sets `Cache-Control: no-cache` to the http response header
func (*Context) NoContent ¶
func (c *Context) NoContent()
NoContent clean all content and set status to 204
func (*Context) NoStore ¶
func (c *Context) NoStore()
NoStore sets `Cache-Control: no-store` to the http response header
func (*Context) NotModified ¶
func (c *Context) NotModified()
NotModified clean all content and set status to 304
func (*Context) PrivateCacheMaxAge ¶ added in v1.4.0
PrivateCacheMaxAge sets `Cache-Control: private, max-age=MaxAge` to the response header.
func (*Context) Push ¶
func (c *Context) Push(target string, opts *http.PushOptions) error
Push the target to http response
func (*Context) Query ¶
Query returns the query map. It will return map[string]string, not the same as url.Values If want to get url.Values, use c.Request.URL.Query()
func (*Context) QueryParam ¶
QueryParam returns the query param value
func (*Context) RealIP ¶
RealIP returns the real ip of request, it will get ip from x-forwarded-for from request header, if not exists then it will get ip from x-real-ip from request header, if not exists then it will use remote addr.
func (*Context) RemoteAddr ¶
RemoteAddr returns the remote addr of request
func (*Context) ServerTiming ¶ added in v0.2.2
func (c *Context) ServerTiming(traceInfos TraceInfos, prefix string)
ServerTiming converts trace info to http response server timing
func (*Context) SetContentTypeByExt ¶
SetContentTypeByExt sets content type by file extname
func (*Context) SetHeader ¶
SetHeader sets the key/value to response header. It replaces any existing values of the key.
func (*Context) SetRequestHeader ¶
SetRequestHeader sets http header to request. It replaces any existing values of the key.
func (*Context) SignedCookie ¶
SignedCookie returns signed cookie from http request
func (*Context) WithContext ¶ added in v0.3.0
WithContext changes the request to new request with context
func (*Context) WriteHeader ¶
WriteHeader sets the http status code
type ContextKey ¶ added in v1.7.0
type ContextKey string
const ContextTraceKey ContextKey = "contextTrace"
type DoneListener ¶ added in v1.8.4
type DoneListener func(*Context)
DoneListener request done listener
type Elton ¶
type Elton struct { // Server http server Server *http.Server // ErrorHandler set the function for error handler ErrorHandler ErrorHandler // NotFoundHandler set the function for not found handler NotFoundHandler http.HandlerFunc // MethodNotAllowedHandler set the function for method not allowed handler MethodNotAllowedHandler http.HandlerFunc // GenerateID generate id function, will use it to create context's id GenerateID GenerateID // EnableTrace enable trace EnableTrace bool // SignedKeys signed keys SignedKeys SignedKeysGenerator // contains filtered or unexported fields }
Elton web framework instance
func NewWithoutServer ¶
func NewWithoutServer() *Elton
NewWithoutServer returns a new elton instance without http server
func (*Elton) EmitError ¶
EmitError emits an error event, it will call the listen functions of error event
func (*Elton) EmitTrace ¶
func (e *Elton) EmitTrace(c *Context, infos TraceInfos) *Elton
EmitTrace emits a trace event, it will call the listen functions of trace event
func (*Elton) GetFunctionName ¶
GetFunctionName return the name of handler function
func (*Elton) GetRouters ¶ added in v1.1.0
func (e *Elton) GetRouters() []RouterInfo
GetRouters returns routers of elton
func (*Elton) GracefulClose ¶
GracefulClose closes the http server graceful. It sets the status to be closing and delay to close.
func (*Elton) ListenAndServe ¶
ListenAndServe listens the addr and serve http, it will throw panic if the server of elton is nil.
func (*Elton) ListenAndServeTLS ¶ added in v0.2.3
ListenAndServeTLS listens the addr and server https, it will throw panic if the server of elton is nil.
func (*Elton) OnBefore ¶ added in v1.8.4
func (e *Elton) OnBefore(ln BeforeListener) *Elton
OnBefore adds listen to before request done(after pre middlewares, before middlewares)
func (*Elton) OnDone ¶ added in v1.8.4
func (e *Elton) OnDone(ln DoneListener) *Elton
OnDone adds listen to request done, it will be triggered when the request handle is done
func (*Elton) OnError ¶
func (e *Elton) OnError(ln ErrorListener) *Elton
OnError adds listen to error event
func (*Elton) OnTrace ¶
func (e *Elton) OnTrace(ln TraceListener) *Elton
OnTrace adds listen to trace event
func (*Elton) Pre ¶
func (e *Elton) Pre(handlerList ...PreHandler) *Elton
Pre adds pre middleware function handler to elton's pre middleware list
func (*Elton) ServeHTTP ¶
func (e *Elton) ServeHTTP(resp http.ResponseWriter, req *http.Request)
ServeHTTP http handler
func (*Elton) SetFunctionName ¶
SetFunctionName sets the name of handler function, it will use to http timing
type EndpointHandler ¶ added in v0.4.1
type EndpointHandler func(c *Context)
type Group ¶
Group group router
type HTMLTemplate ¶ added in v1.6.0
type HTMLTemplate struct {
// contains filtered or unexported fields
}
func NewHTMLTemplate ¶ added in v1.6.0
func NewHTMLTemplate(read ReadFile) *HTMLTemplate
func (*HTMLTemplate) RenderFile ¶ added in v1.6.0
func (ht *HTMLTemplate) RenderFile(ctx context.Context, filename string, data interface{}) (string, error)
Render renders the text of file using text/template
type RWMutexSignedKeys ¶
RWMutexSignedKeys read/write mutex signed key
func (*RWMutexSignedKeys) GetKeys ¶
func (rwSk *RWMutexSignedKeys) GetKeys() []string
GetKeys returns the key list of rwmutex signed keys
func (*RWMutexSignedKeys) SetKeys ¶
func (rwSk *RWMutexSignedKeys) SetKeys(values []string)
SetKeys sets the key list of rwmutex signed keys
type RouteParams ¶ added in v0.4.1
type RouteParams struct {
Keys, Values []string
// contains filtered or unexported fields
}
RouteParams is a structure to track URL routing parameters efficiently.
func (*RouteParams) Add ¶ added in v0.4.1
func (s *RouteParams) Add(key, value string)
Add a URL parameter to the end of the route param
func (*RouteParams) Get ¶ added in v0.4.1
func (s *RouteParams) Get(key string) string
Get value from params
func (*RouteParams) ToMap ¶ added in v0.4.1
func (s *RouteParams) ToMap() map[string]string
ToMap converts route params to map[string]string
type Router ¶
type Router struct { Method string `json:"method,omitempty"` Path string `json:"path,omitempty"` HandleList []Handler `json:"-"` }
Router router
type RouterInfo ¶
type RouterInfo struct { Method string `json:"method,omitempty"` Route string `json:"route,omitempty"` }
RouterInfo router's info
type SignedKeysGenerator ¶
SignedKeysGenerator signed keys generator
type SimpleSignedKeys ¶
type SimpleSignedKeys struct {
// contains filtered or unexported fields
}
SimpleSignedKeys simple sigined key
func (*SimpleSignedKeys) GetKeys ¶
func (sk *SimpleSignedKeys) GetKeys() []string
GetKeys returns the key list of simple signed keys
func (*SimpleSignedKeys) SetKeys ¶
func (sk *SimpleSignedKeys) SetKeys(values []string)
SetKeys sets the key list of simple signed keys
type TemplateParser ¶ added in v1.6.0
type TemplateParsers ¶ added in v1.6.0
type TemplateParsers map[string]TemplateParser
func NewTemplateParsers ¶ added in v1.6.0
func NewTemplateParsers() TemplateParsers
func (TemplateParsers) Add ¶ added in v1.6.0
func (tps TemplateParsers) Add(template string, parser TemplateParser)
func (TemplateParsers) Get ¶ added in v1.6.0
func (tps TemplateParsers) Get(template string) TemplateParser
type Trace ¶ added in v1.7.0
type Trace struct { Infos TraceInfos // contains filtered or unexported fields }
func GetTrace ¶ added in v1.7.0
GetTrace get trace from context, if context without trace, new trace will be created.
type TraceInfo ¶
type TraceInfo struct { Middleware bool `json:"-"` Name string `json:"name,omitempty"` Duration time.Duration `json:"duration,omitempty"` }
TraceInfo trace's info
type TraceInfos ¶
type TraceInfos []*TraceInfo
TraceInfos trace infos
func (TraceInfos) Filter ¶ added in v1.8.3
func (traceInfos TraceInfos) Filter(fn func(*TraceInfo) bool) TraceInfos
Filter filters the trace info, the new trace infos will be returned.
func (TraceInfos) FilterDurationGT ¶ added in v1.8.3
func (traceInfos TraceInfos) FilterDurationGT(d time.Duration) TraceInfos
FilterDurationGT flters the duration of trace is gt than d.
func (TraceInfos) ServerTiming ¶
func (traceInfos TraceInfos) ServerTiming(prefix string) string
ServerTiming return server timing with prefix
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |