Documentation ¶
Index ¶
- Constants
- func LiveHandler(c *gin.Context)
- func ReadHandler(c *gin.Context)
- func VersionHandler(c *gin.Context)
- type Options
- type Profile
- type Route
- type Router
- func (r *Router) AddProfile(method, href, desc string)
- func (r *Router) AddRoutes(apiGroup string, routes []*Route)
- func (r *Router) DefaultRoutes() []*Route
- func (r *Router) IndexHandler(c *gin.Context)
- func (r *Router) Start(stopCh <-chan struct{}) error
- func (r *Router) StartWarp(stopCh <-chan struct{})
Constants ¶
View Source
const ( VersionPath = "/version" MetricsPath = "/metrics" LivePath = "/live" ReadyPath = "/ready" PprofPath = "/debug/pprof" )
other URLs
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { GinLogEnabled bool GinLogSkipPath []string PprofEnabled bool MetricsEnabled bool Addr string MetricsSubsystem string MetricsPath string ShutdownTimeout time.Duration // Username string // Password string CertFilePath string KeyFilePath string }
Options are options for constructing a Router
type Route ¶
type Route struct { Method string Path string Handler gin.HandlerFunc Desc string }
Route represents an application route
Click to show internal directories.
Click to hide internal directories.