Documentation
¶
Index ¶
Constants ¶
const EmptyURLPath = ""
EmptyURLPath 表示空的 URL 路径。 EmptyURLPath represents the empty URL path.
const HealthCheckURLPath = "/ping"
HealthCheckURLPath 表示 health check 的 URL 路径。 HealthCheckURLPath represents the URL path for health check.
const HttpHeaderContentType = "Content-Type"
HttpHeaderContentType 表示 Content-Type 的 HTTP 头部键。 HttpHeaderContentType represents the HTTP header key for Content-Type.
const HttpHeaderJSONContentTypeValue = binding.MIMEJSON
HttpHeaderJSONContentTypeValue 表示 JSON Content-Type 的值。 HttpHeaderJSONContentTypeValue represents the value for JSON Content-Type.
const HttpHeaderJavascriptContentTypeValue = "application/javascript"
HttpHeaderJavascriptContentTypeValue 表示 JavaScript Content-Type 的值。 HttpHeaderJavascriptContentTypeValue represents the value for JavaScript Content-Type.
const HttpHeaderPXMLContentTypeValue = binding.MIMEXML2
HttpHeaderPXMLContentTypeValue 表示 Test XML Content-Type 的值。 HttpHeaderPXMLContentTypeValue represents the value for Test XML Content-Type.
const HttpHeaderRequestID = "X-Request-Id"
HttpHeaderRequestID 表示 Request ID 的 HTTP 头部键。 HttpHeaderRequestID represents the HTTP header key for Request ID.
const HttpHeaderTOMLContentTypeValue = binding.MIMETOML
HttpHeaderTOMLContentTypeValue 表示 TOML Content-Type 的值。 HttpHeaderTOMLContentTypeValue represents the value for TOML Content-Type.
const HttpHeaderTextContentTypeValue = binding.MIMEPlain
HttpHeaderTextContentTypeValue 表示 Plain Text Content-Type 的值。 HttpHeaderTextContentTypeValue represents the value for Plain Text Content-Type.
const HttpHeaderXMLContentTypeValue = binding.MIMEXML
HttpHeaderXMLContentTypeValue 表示 XML Content-Type 的值。 HttpHeaderXMLContentTypeValue represents the value for XML Content-Type.
const HttpHeaderYAMLContentTypeValue = binding.MIMEYAML
HttpHeaderYAMLContentTypeValue 表示 YAML Content-Type 的值。 HttpHeaderYAMLContentTypeValue represents the value for YAML Content-Type.
const OrbitName = "orbit"
const PprofURLPath = "/debug/pprof"
PprofURLPath 表示 pprof debugging 的 URL 路径。 PprofURLPath represents the URL path for pprof debugging.
const PromMetricURLPath = "/metrics"
PromMetricURLPath 表示 Prometheus metrics 的 URL 路径。 PromMetricURLPath represents the URL path for Prometheus metrics.
const RequestBodyBufferKey = "REQUEST_BODY_zdiT5HaFaMF7ZfO556rZRYqn"
RequestBodyBufferKey 表示 request body buffer 的键。 RequestBodyBufferKey represents the key for request body buffer.
const RequestErrorCode int64 = 10
RequestErrorCode 表示请求错误的代码。 RequestErrorCode represents the error code for a request.
const RequestLoggerKey = "REQUEST_LOGGER_3Z3opcTKBSe2O5yZQnSGD"
RequestLoggerKey 表示 request logger 的键。 RequestLoggerKey represents the key for request logger.
const RequestOK = "success"
RequestOK 表示请求成功的消息。 RequestOK represents the success message for a request.
const RequestOKCode int64 = 0
RequestOKCode 表示请求成功的代码。 RequestOKCode represents the success code for a request.
const ResponseBodyBufferKey = "RESPONSE_BODY_DT6IKLsNULVD3bTgnz1QJbeN"
ResponseBodyBufferKey 表示 response body buffer 的键。 ResponseBodyBufferKey represents the key for response body buffer.
const RootURLPath = "/"
RootURLPath 表示 root URL 路径。 RootURLPath represents the root URL path.
const SwaggerURLPath = "/docs"
SwaggerURLPath 表示 Swagger documentation 的 URL 路径。 SwaggerURLPath represents the URL path for Swagger documentation.
Variables ¶
var DefaultConsoleLogger = log.NewZapLogger(nil)
DefaultConsoleLogger 是默认的控制台日志记录器。 DefaultConsoleLogger is the default console logger.
var DefaultLogrLogger = DefaultConsoleLogger.GetLogrLogger().WithName(log.DefaultLoggerName)
DefaultLogrLogger 是默认的 klog 日志记录器。 DefaultLogrLogger is the default klog logger.
var DefaultSugeredLogger = DefaultConsoleLogger.GetZapSugaredLogger().Named(log.DefaultLoggerName)
DefaultSugeredLogger 是默认的带糖的日志记录器。 DefaultSugeredLogger is the default sugared logger.
var LogEventPool = bp.NewLogEventPool()
LogEventPool 是用于日志事件的池。 LogEventPool is a pool for log events.
var RequestBodyBufferPool = bp.NewBufferPool(0)
RequestBodyBufferPool 是用于请求体的缓冲池。 RequestBodyBufferPool is a buffer pool for request bodies.
var ResponseBodyBufferPool = bp.NewBufferPool(0)
ResponseBodyBufferPool 是用于响应体的缓冲池。 ResponseBodyBufferPool is a buffer pool for response bodies.
Functions ¶
This section is empty.