router

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMethodMiddleware added in v0.0.4

func CORSMethodMiddleware(r *mux.Router) mux.MiddlewareFunc

CORSMethodMiddleware automatically sets the Access-Control-Allow-Methods response header

func GetRootCmd

func GetRootCmd(args []string) *cobra.Command

GetRootCmd returns the root of the cobra command-tree.

func LogMiddleware added in v0.0.4

func LogMiddleware(r *mux.Router) mux.MiddlewareFunc

LogMiddleware automatically sets the Access-Control-Allow-Methods response header

func RegisterStaticHandler added in v0.0.4

func RegisterStaticHandler(r *mux.Router, qOpts *QueryOptions)

RegisterStaticHandler adds handler for static assets to the router.

func VersionCommand added in v0.0.4

func VersionCommand() *cobra.Command

Types

type QueryOptions added in v0.0.4

type QueryOptions struct {
	// FileDir static file dir (/opt/solar-mesh/dist)
	FileDir string
	// BasePath is the prefix for all UI and API HTTP routes
	BasePath string
	// StaticAssets is the path for the static assets for the UI (https://github.com/uber/jaeger-ui)
	StaticAssets string
	// AdditionalHeaders
	AdditionalHeaders http.Header
	// MaxClockSkewAdjust is the maximum duration by which jaeger-query will adjust a span
	MaxClockSkewAdjust time.Duration
}

QueryOptions holds configuration for query service

type Root

type Root struct {
	Port       int32
	FileDir    string
	Path       string
	PublicPath string
	IsGzip     bool
}

type Server

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

func NewServer

func NewServer(root *Root) *Server

func (*Server) Run

func (s *Server) Run()

type StaticAssetsHandler added in v0.0.4

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

StaticAssetsHandler handles static assets

func NewStaticAssetsHandler added in v0.0.4

func NewStaticAssetsHandler(staticAssetsRoot string, options StaticAssetsHandlerOptions) (*StaticAssetsHandler, error)

NewStaticAssetsHandler returns a StaticAssetsHandler

func (*StaticAssetsHandler) RegisterRoutes added in v0.0.4

func (sH *StaticAssetsHandler) RegisterRoutes(router *mux.Router)

RegisterRoutes registers routes for this handler on the given router

type StaticAssetsHandlerOptions added in v0.0.4

type StaticAssetsHandlerOptions struct {
	// FileDir static file dir (/opt/solar-mesh/dist)
	FileDir  string
	BasePath string
	IsGzip   bool
}

StaticAssetsHandlerOptions defines options for NewStaticAssetsHandler

Jump to

Keyboard shortcuts

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