Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableMetric ¶
func EnableMetric(srv *gin.Engine, options ...MetricsOptFunc) (err error)
EnableMetric enable metrics for exsits gin server
func NewHTTPMetricSrv ¶
NewHTTPMetricSrv start new gin server with metrics api
Types ¶
type MetricsOptFunc ¶
type MetricsOptFunc func(*metricOption) error
MetricsOptFunc option of metrics
func WithMetricAddr ¶
func WithMetricAddr(addr string) MetricsOptFunc
WithMetricAddr set option addr
func WithMetricGraceWait ¶
func WithMetricGraceWait(wait time.Duration) MetricsOptFunc
WithMetricGraceWait set wating time after graceful shutdown
func WithPprofPath ¶
func WithPprofPath(path string) MetricsOptFunc
WithPprofPath set option pprofPath
Click to show internal directories.
Click to hide internal directories.