Documentation
¶
Index ¶
Constants ¶
const EmptyURLPath = ""
EmptyURLPath represents the empty URL path.
const HealthCheckURLPath = "/ping"
HealthCheckURLPath represents the URL path for health check.
const HttpHeaderContentType = "Content-Type"
HttpHeaderContentType represents the HTTP header key for Content-Type.
const HttpHeaderJSONContentTypeValue = binding.MIMEJSON
HttpHeaderJSONContentTypeValue represents the value for JSON Content-Type.
const HttpHeaderJavascriptContentTypeValue = "application/javascript"
HttpHeaderJavascriptContentTypeValue represents the value for JavaScript Content-Type.
const HttpHeaderPXMLContentTypeValue = binding.MIMEXML2
HttpHeaderPXMLContentTypeValue represents the value for Test XML Content-Type.
const HttpHeaderRequestID = "X-Request-Id"
HttpHeaderRequestID represents the HTTP header key for Request ID.
const HttpHeaderTOMLContentTypeValue = binding.MIMETOML
HttpHeaderTOMLContentTypeValue represents the value for TOML Content-Type.
const HttpHeaderTextContentTypeValue = binding.MIMEPlain
HttpHeaderTextContentTypeValue represents the value for Plain Text Content-Type.
const HttpHeaderXMLContentTypeValue = binding.MIMEXML
HttpHeaderXMLContentTypeValue represents the value for XML Content-Type.
const HttpHeaderYAMLContentTypeValue = binding.MIMEYAML
HttpHeaderYAMLContentTypeValue represents the value for YAML Content-Type.
const OrbitName = "orbit"
const PprofURLPath = "/debug/pprof"
PprofURLPath represents the URL path for pprof debugging.
const PromMetricURLPath = "/metrics"
PromMetricURLPath represents the URL path for Prometheus metrics.
const RequestBodyBufferKey = "REQUEST_BODY_zdiT5HaFaMF7ZfO556rZRYqn"
RequestBodyBufferKey represents the key for request body buffer.
const RequestErrorCode int64 = 10
RequestErrorCode represents the error code for a request.
const RequestLoggerKey = "REQUEST_LOGGER_3Z3opcTKBSe2O5yZQnSGD"
RequestLoggerKey represents the key for request logger.
const RequestOK = "success"
RequestOK represents the success message for a request.
const RequestOKCode int64 = 0
RequestOKCode represents the success code for a request.
const ResponseBodyBufferKey = "RESPONSE_BODY_DT6IKLsNULVD3bTgnz1QJbeN"
ResponseBodyBufferKey represents the key for response body buffer.
const RootURLPath = "/"
RootURLPath represents the root URL path.
const SwaggerURLPath = "/docs"
SwaggerURLPath represents the URL path for Swagger documentation.
Variables ¶
var DefaultConsoleLogger = log.NewLogger(nil)
DefaultConsoleLogger is the default console logger.
var DefaultSugeredLogger = DefaultConsoleLogger.GetZapSugaredLogger().Named(log.DefaultLoggerName)
DefaultSugeredLogger is the default sugared logger.
var LogEventPool = bp.NewLogEventPool()
LogEventPool is a pool for log events.
var RequestBodyBufferPool = bp.NewBufferPool(0)
RequestBodyBufferPool is a buffer pool for request bodies.
var ResponseBodyBufferPool = bp.NewBufferPool(0)
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 represents a function for logging events.