common

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyURLPath = ""

EmptyURLPath 表示空的 URL 路径。 EmptyURLPath represents the empty URL path.

View Source
const HealthCheckURLPath = "/ping"

HealthCheckURLPath 表示 health check 的 URL 路径。 HealthCheckURLPath represents the URL path for health check.

View Source
const HttpHeaderContentType = "Content-Type"

HttpHeaderContentType 表示 Content-Type 的 HTTP 头部键。 HttpHeaderContentType represents the HTTP header key for Content-Type.

View Source
const HttpHeaderJSONContentTypeValue = binding.MIMEJSON

HttpHeaderJSONContentTypeValue 表示 JSON Content-Type 的值。 HttpHeaderJSONContentTypeValue represents the value for JSON Content-Type.

View Source
const HttpHeaderJavascriptContentTypeValue = "application/javascript"

HttpHeaderJavascriptContentTypeValue 表示 JavaScript Content-Type 的值。 HttpHeaderJavascriptContentTypeValue represents the value for JavaScript Content-Type.

View Source
const HttpHeaderPXMLContentTypeValue = binding.MIMEXML2

HttpHeaderPXMLContentTypeValue 表示 Test XML Content-Type 的值。 HttpHeaderPXMLContentTypeValue represents the value for Test XML Content-Type.

View Source
const HttpHeaderRequestID = "X-Request-Id"

HttpHeaderRequestID 表示 Request ID 的 HTTP 头部键。 HttpHeaderRequestID represents the HTTP header key for Request ID.

View Source
const HttpHeaderTOMLContentTypeValue = binding.MIMETOML

HttpHeaderTOMLContentTypeValue 表示 TOML Content-Type 的值。 HttpHeaderTOMLContentTypeValue represents the value for TOML Content-Type.

View Source
const HttpHeaderTextContentTypeValue = binding.MIMEPlain

HttpHeaderTextContentTypeValue 表示 Plain Text Content-Type 的值。 HttpHeaderTextContentTypeValue represents the value for Plain Text Content-Type.

View Source
const HttpHeaderXMLContentTypeValue = binding.MIMEXML

HttpHeaderXMLContentTypeValue 表示 XML Content-Type 的值。 HttpHeaderXMLContentTypeValue represents the value for XML Content-Type.

View Source
const HttpHeaderYAMLContentTypeValue = binding.MIMEYAML

HttpHeaderYAMLContentTypeValue 表示 YAML Content-Type 的值。 HttpHeaderYAMLContentTypeValue represents the value for YAML Content-Type.

View Source
const OrbitName = "orbit"
View Source
const PprofURLPath = "/debug/pprof"

PprofURLPath 表示 pprof debugging 的 URL 路径。 PprofURLPath represents the URL path for pprof debugging.

View Source
const PromMetricURLPath = "/metrics"

PromMetricURLPath 表示 Prometheus metrics 的 URL 路径。 PromMetricURLPath represents the URL path for Prometheus metrics.

View Source
const RequestBodyBufferKey = "REQUEST_BODY_zdiT5HaFaMF7ZfO556rZRYqn"

RequestBodyBufferKey 表示 request body buffer 的键。 RequestBodyBufferKey represents the key for request body buffer.

View Source
const RequestErrorCode int64 = 10

RequestErrorCode 表示请求错误的代码。 RequestErrorCode represents the error code for a request.

View Source
const RequestLoggerKey = "REQUEST_LOGGER_3Z3opcTKBSe2O5yZQnSGD"

RequestLoggerKey 表示 request logger 的键。 RequestLoggerKey represents the key for request logger.

View Source
const RequestOK = "success"

RequestOK 表示请求成功的消息。 RequestOK represents the success message for a request.

View Source
const RequestOKCode int64 = 0

RequestOKCode 表示请求成功的代码。 RequestOKCode represents the success code for a request.

View Source
const ResponseBodyBufferKey = "RESPONSE_BODY_DT6IKLsNULVD3bTgnz1QJbeN"

ResponseBodyBufferKey 表示 response body buffer 的键。 ResponseBodyBufferKey represents the key for response body buffer.

View Source
const RootURLPath = "/"

RootURLPath 表示 root URL 路径。 RootURLPath represents the root URL path.

View Source
const SwaggerURLPath = "/docs"

SwaggerURLPath 表示 Swagger documentation 的 URL 路径。 SwaggerURLPath represents the URL path for Swagger documentation.

Variables

View Source
var DefaultConsoleLogger = log.NewLogger(nil)

DefaultConsoleLogger 是默认的控制台日志记录器。 DefaultConsoleLogger is the default console logger.

View Source
var DefaultSugeredLogger = DefaultConsoleLogger.GetZapSugaredLogger().Named(log.DefaultLoggerName)

DefaultSugeredLogger 是默认的带糖的日志记录器。 DefaultSugeredLogger is the default sugared logger.

View Source
var LogEventPool = bp.NewLogEventPool()

LogEventPool 是用于日志事件的池。 LogEventPool is a pool for log events.

View Source
var RequestBodyBufferPool = bp.NewBufferPool(0)

RequestBodyBufferPool 是用于请求体的缓冲池。 RequestBodyBufferPool is a buffer pool for request bodies.

View Source
var ResponseBodyBufferPool = bp.NewBufferPool(0)

ResponseBodyBufferPool 是用于响应体的缓冲池。 ResponseBodyBufferPool is a buffer pool for response bodies.

Functions

This section is empty.

Types

type LogEventFunc

type LogEventFunc func(logger *zap.SugaredLogger, event *log.LogEvent)

LogEventFunc 表示一个用于记录事件的函数。 LogEventFunc represents a function for logging events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL