metrictank: github.com/grafana/metrictank/api/middleware Index | Files

package middleware

import "github.com/grafana/metrictank/api/middleware"

Index

Package Files

capturebody.go cluster.go logger.go middleware.go stats.go tracer.go

Variables

var (
    LogHeaders = false
)

func CaptureBody Uses

func CaptureBody(c *Context)

func CorsHandler Uses

func CorsHandler() macaron.Handler

func DisableTracing Uses

func DisableTracing(c *Context)

func Logger Uses

func Logger() macaron.Handler

func NodeReady Uses

func NodeReady() macaron.Handler

func OrgMiddleware Uses

func OrgMiddleware(multiTenant bool) macaron.Handler

func RequestStats Uses

func RequestStats() macaron.Handler

RequestStats returns a middleware that tracks request metrics.

func RequireOrg Uses

func RequireOrg() macaron.Handler

func Tracer Uses

func Tracer(tracer opentracing.Tracer) macaron.Handler

Tracer returns a middleware that traces requests

type Context Uses

type Context struct {
    *macaron.Context
    OrgId uint32
    Body  io.ReadCloser
}

type LoggingResponseWriter Uses

type LoggingResponseWriter struct {
    macaron.ResponseWriter
    // contains filtered or unexported fields
}

func (*LoggingResponseWriter) Write Uses

func (rw *LoggingResponseWriter) Write(b []byte) (int, error)

type TracingResponseWriter Uses

type TracingResponseWriter struct {
    macaron.ResponseWriter
    // contains filtered or unexported fields
}

func (*TracingResponseWriter) Write Uses

func (rw *TracingResponseWriter) Write(b []byte) (int, error)

Package middleware imports 23 packages (graph) and is imported by 3 packages. Updated 2020-04-06. Refresh now. Tools for package owners.