app

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 65 Imported by: 60

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandlerOptions handlerOptions

HandlerOptions is a factory for all available HandlerOptions

Functions

func AddFlags added in v1.2.0

func AddFlags(flagSet *flag.FlagSet)

AddFlags adds flags for QueryOptions

func NewRouter added in v1.4.0

func NewRouter() *mux.Router

NewRouter creates and configures a Gorilla Router.

func RegisterStaticHandler added in v1.3.0

func RegisterStaticHandler(r *mux.Router, logger *zap.Logger, qOpts *QueryOptions, qCapabilities querysvc.StorageCapabilities) io.Closer

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, tm *tenancy.Manager, 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 added in v1.12.0

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

GRPCHandler implements the gRPC endpoint of the query service.

func NewGRPCHandler added in v1.12.0

func NewGRPCHandler(queryService *querysvc.QueryService,
	metricsQueryService querysvc.MetricsQueryService,
	options GRPCHandlerOptions,
) *GRPCHandler

NewGRPCHandler returns a GRPCHandler.

func (*GRPCHandler) ArchiveTrace added in v1.12.0

ArchiveTrace is the gRPC handler to archive traces.

func (*GRPCHandler) FindTraces added in v1.12.0

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

func (*GRPCHandler) GetCallRates added in v1.24.0

GetCallRates is the gRPC handler to fetch call rate metrics.

func (*GRPCHandler) GetDependencies added in v1.12.0

GetDependencies is the gRPC handler to fetch dependencies.

func (*GRPCHandler) GetErrorRates added in v1.24.0

GetErrorRates is the gRPC handler to fetch error rate metrics.

func (*GRPCHandler) GetLatencies added in v1.24.0

GetLatencies is the gRPC handler to fetch latency metrics.

func (*GRPCHandler) GetMinStepDuration added in v1.24.0

GetMinStepDuration is the gRPC handler to fetch the minimum step duration supported by the underlying metrics store.

func (*GRPCHandler) GetOperations added in v1.12.0

GetOperations is the gRPC handler to fetch operations.

func (*GRPCHandler) GetServices added in v1.12.0

GetServices is the gRPC handler to fetch services.

func (*GRPCHandler) GetTrace added in v1.12.0

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

type GRPCHandlerOptions added in v1.44.0

type GRPCHandlerOptions struct {
	Logger *zap.Logger
	Tracer *jtracer.JTracer
	NowFn  func() time.Time
}

GRPCHandlerOptions contains optional members of GRPCHandler.

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 added in v1.2.0

type QueryOptions struct {
	QueryOptionsBase

	// HTTPHostPort is the host:port address that the query service listens in on for http requests
	HTTPHostPort string
	// GRPCHostPort is the host:port address that the query service listens in on for gRPC requests
	GRPCHostPort string
	// TLSGRPC configures secure transport (Consumer to Query service GRPC API)
	TLSGRPC tlscfg.Options
	// TLSHTTP configures secure transport (Consumer to Query service HTTP API)
	TLSHTTP tlscfg.Options
}

QueryOptions holds configuration for query service

func (*QueryOptions) BuildQueryServiceOptions added in v1.18.0

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 added in v1.2.0

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

InitFromViper initializes QueryOptions with properties from viper

type QueryOptionsBase added in v1.51.0

type QueryOptionsBase struct {
	// BasePath is the base path for all HTTP routes
	BasePath string

	StaticAssets QueryOptionsStaticAssets `valid:"optional" mapstructure:"static_assets"`

	// UIConfig is the path to a configuration file for the UI
	UIConfig string `valid:"optional" mapstructure:"ui_config"`
	// BearerTokenPropagation activate/deactivate bearer token propagation to storage
	BearerTokenPropagation bool
	// AdditionalHeaders
	AdditionalHeaders http.Header
	// MaxClockSkewAdjust is the maximum duration by which jaeger-query will adjust a span
	MaxClockSkewAdjust time.Duration
	// Tenancy configures tenancy for query
	Tenancy tenancy.Options
	// EnableTracing determines whether traces will be emitted by jaeger-query.
	EnableTracing bool
}

QueryOptionsBase holds configuration for query service shared with jaeger(v2)

type QueryOptionsStaticAssets added in v1.51.0

type QueryOptionsStaticAssets struct {
	// Path is the path for the static assets for the UI (https://github.com/uber/jaeger-ui)
	Path string `valid:"optional" mapstructure:"path"`
	// LogAccess tells static handler to log access to static assets, useful in debugging
	LogAccess bool `valid:"optional" mapstructure:"log_access"`
}

QueryOptionsStaticAssets contains configuration for handling static assets

type Server added in v1.12.0

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

Server runs HTTP, Mux and a grpc server

func NewServer added in v1.12.0

func NewServer(logger *zap.Logger, healthCheck *healthcheck.HealthCheck, querySvc *querysvc.QueryService, metricsQuerySvc querysvc.MetricsQueryService, options *QueryOptions, tm *tenancy.Manager, tracer *jtracer.JTracer) (*Server, error)

NewServer creates and initializes Server

func (*Server) Close added in v1.12.0

func (s *Server) Close() error

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

func (*Server) Start added in v1.12.0

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) Close added in v1.56.0

func (sH *StaticAssetsHandler) Close() error

func (*StaticAssetsHandler) RegisterRoutes

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

RegisterRoutes registers routes for this handler on the given router

type StaticAssetsHandlerOptions added in v1.3.0

type StaticAssetsHandlerOptions struct {
	BasePath            string
	UIConfigPath        string
	LogAccess           bool
	StorageCapabilities querysvc.StorageCapabilities
	Logger              *zap.Logger
}

StaticAssetsHandlerOptions defines options for NewStaticAssetsHandler

Directories

Path Synopsis
internal
Package ui bundles UI assets packaged with stdlib/embed.
Package ui bundles UI assets packaged with stdlib/embed.

Jump to

Keyboard shortcuts

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