traceapp

package
v0.0.0-...-43e36a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootRoute             = "traceapp.root"               // route name for root
	TraceRoute            = "traceapp.trace"              // route name for a single trace page
	TraceSpanRoute        = "traceapp.trace.span"         // route name for a single trace sub-span page
	TraceProfileRoute     = "traceapp.trace.profile"      // route name for a JSON trace profile
	TraceSpanProfileRoute = "traceapp.trace.span.profile" // route name for a JSON trace sub-span profile
	TracesRoute           = "traceapp.traces"             // route name for traces page
)

Traceapp's route names.

Variables

View Source
var (
	// ReloadTemplates is whether to reload html/template templates
	// before each request. It is useful during development.
	ReloadTemplates = true
)

Functions

This section is empty.

Types

type App

type App struct {
	*Router

	Store   appdash.Store
	Queryer appdash.Queryer
	// contains filtered or unexported fields
}

App is an HTTP application handler that also exposes methods for constructing URL routes.

func New

func New(r *Router) *App

New creates a new application handler. If r is nil, a new router is created.

func (*App) ServeHTTP

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is a URL router for traceapp applications. It should be created via the NewRouter function.

func NewRouter

func NewRouter(base *mux.Router) *Router

NewRouter creates a new URL router for a traceapp application.

func (*Router) URLTo

func (r *Router) URLTo(route string) (*url.URL, error)

URLTo constructs a URL to a given route.

func (*Router) URLToTrace

func (r *Router) URLToTrace(id appdash.ID) (*url.URL, error)

URLToTrace constructs a URL to a given trace by ID.

func (*Router) URLToTraceProfile

func (r *Router) URLToTraceProfile(trace appdash.ID) (*url.URL, error)

URLToTraceProfile constructs a URL to a trace's JSON profile.

func (*Router) URLToTraceSpan

func (r *Router) URLToTraceSpan(trace, span appdash.ID) (*url.URL, error)

URLToTraceSpan constructs a URL to a sub-span in a trace.

func (*Router) URLToTraceSpanProfile

func (r *Router) URLToTraceSpanProfile(trace, span appdash.ID) (*url.URL, error)

URLToTraceSpanProfile constructs a URL to a sub-span's JSON profile in a trace.

type TemplateCommon

type TemplateCommon struct {
	CurrentRoute string
	CurrentURI   *url.URL
	BaseURL      *url.URL
}

TemplateCommon is data that is passed to (and available to) all templates.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL