Documentation
¶
Index ¶
Constants ¶
View Source
const (
TokenContextKey = "_piko_token"
)
Variables ¶
This section is empty.
Functions ¶
func NewLogger ¶
func NewLogger(config log.AccessLogConfig, logger log.Logger) gin.HandlerFunc
NewLogger creates logging middleware for the access log.
Types ¶
type Auth ¶ added in v0.6.1
type Auth struct {
// contains filtered or unexported fields
}
Auth is middleware to verify token requests.
type Metrics ¶
type Metrics struct {
RequestsInFlight prometheus.Gauge
RequestsTotal *prometheus.CounterVec
RequestLatency *prometheus.HistogramVec
RequestSize prometheus.Histogram
ResponseSize prometheus.Histogram
}
func NewMetrics ¶
func (*Metrics) Handler ¶
func (m *Metrics) Handler() gin.HandlerFunc
func (*Metrics) Register ¶
func (m *Metrics) Register(registry *prometheus.Registry)
Click to show internal directories.
Click to hide internal directories.