app

package
v0.0.0-...-be244c0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrServiceParameterRequired occurs when no service name is defined
	ErrServiceParameterRequired = fmt.Errorf("parameter '%s' is required", serviceParam)
)
View Source
var HandlerOptions handlerOptions

HandlerOptions is a factory for all available HandlerOptions

Functions

func AddFlags

func AddFlags(flagSet *flag.FlagSet)

AddFlags adds flags for QueryOptions

func NewRouter

func NewRouter() *mux.Router

NewRouter creates and configures a Gorilla Router.

func RegisterStaticHandler

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

RegisterStaticHandler adds handler for static assets to the router.

Types

type APIHandler

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

APIHandler implements the query service public API by registering routes at httpPrefix

func NewAPIHandler

func NewAPIHandler(queryService *querysvc.QueryService, options ...HandlerOption) *APIHandler

NewAPIHandler returns an APIHandler

func (*APIHandler) RegisterRoutes

func (aH *APIHandler) RegisterRoutes(router *mux.Router)

RegisterRoutes registers routes for this handler on the given router

type GRPCHandler

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

GRPCHandler implements the gRPC endpoint of the query service.

func NewGRPCHandler

func NewGRPCHandler(queryService *querysvc.QueryService, logger *zap.Logger, tracer opentracing.Tracer) *GRPCHandler

NewGRPCHandler returns a GRPCHandler

func (*GRPCHandler) ArchiveTrace

ArchiveTrace is the gRPC handler to archive traces.

func (*GRPCHandler) FindTraces

FindTraces is the gRPC handler to fetch traces based on TraceQueryParameters.

func (*GRPCHandler) GetDependencies

GetDependencies is the gRPC handler to fetch dependencies.

func (*GRPCHandler) GetOperations

GetOperations is the gRPC handler to fetch operations.

func (*GRPCHandler) GetServices

GetServices is the gRPC handler to fetch services.

func (*GRPCHandler) GetTrace

GetTrace is the gRPC handler to fetch traces based on trace-id.

type HTTPHandler

type HTTPHandler interface {
	RegisterRoutes(router *mux.Router)
}

HTTPHandler handles http requests

type HandlerOption

type HandlerOption func(handler *APIHandler)

HandlerOption is a function that sets some option on the APIHandler

type QueryOptions

type QueryOptions struct {
	// HostPort is the host:port address that the query service listens o n
	HostPort 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
	// UIConfig is the path to a configuration file for the UI
	UIConfig string
	// BearerTokenPropagation activate/deactivate bearer token propagation to storage
	BearerTokenPropagation bool
	// TLS configures secure transport
	TLS tlscfg.Options
	// 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

func (*QueryOptions) BuildQueryServiceOptions

func (qOpts *QueryOptions) BuildQueryServiceOptions(storageFactory storage.Factory, logger *zap.Logger) *querysvc.QueryServiceOptions

BuildQueryServiceOptions creates a QueryServiceOptions struct with appropriate adjusters and archive config

func (*QueryOptions) InitFromViper

func (qOpts *QueryOptions) InitFromViper(v *viper.Viper, logger *zap.Logger) *QueryOptions

InitFromViper initializes QueryOptions with properties from viper

type Server

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

Server runs HTTP, Mux and a grpc server

func NewServer

func NewServer(logger *zap.Logger, querySvc *querysvc.QueryService, options *QueryOptions, tracer opentracing.Tracer) (*Server, error)

NewServer creates and initializes Server

func (*Server) Close

func (s *Server) Close() error

Close stops http, GRPC servers and closes the port listener.

func (Server) HealthCheckStatus

func (s Server) HealthCheckStatus() chan healthcheck.Status

HealthCheckStatus returns health check status channel a client can subscribe to

func (*Server) Start

func (s *Server) Start() error

Start http, GRPC and cmux servers concurrently

type StaticAssetsHandler

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

StaticAssetsHandler handles static assets

func NewStaticAssetsHandler

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

NewStaticAssetsHandler returns a StaticAssetsHandler

func (*StaticAssetsHandler) RegisterRoutes

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

RegisterRoutes registers routes for this handler on the given router

type StaticAssetsHandlerOptions

type StaticAssetsHandlerOptions struct {
	BasePath     string
	UIConfigPath string
	Logger       *zap.Logger
}

StaticAssetsHandlerOptions defines options for NewStaticAssetsHandler

Directories

Path Synopsis
ui
Package ui installs UI assets packaged with github.com/rakyll/statik.
Package ui installs UI assets packaged with github.com/rakyll/statik.
actual
Package assets contains auto-generated UI asset files created during the build.
Package assets contains auto-generated UI asset files created during the build.

Jump to

Keyboard shortcuts

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