Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
  • Loading branch information
pavolloffay committed Jun 30, 2021
1 parent e6f9b85 commit be579e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/query/app/otel/grpc_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/jaegertracing/jaeger/proto-gen/api_v3"
)

// RegisterGRPCGateway registers api_v3 endpoints into provided mux.
func RegisterGRPCGateway(r *mux.Router, grpcEndpoint string) error {
jsonpb := &runtime.JSONPb{}
grpcGatewayMux := runtime.NewServeMux(
Expand Down
5 changes: 5 additions & 0 deletions cmd/query/app/otel/grpc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ import (
"github.com/jaegertracing/jaeger/storage/spanstore"
)

// Handler implements api_v3.QueryServiceServer
type Handler struct {
QueryService *querysvc.QueryService
}

var _ api_v3.QueryServiceServer = (*Handler)(nil)

// GetTrace implements api_v3.QueryServiceServer's GetTrace
func (h *Handler) GetTrace(request *api_v3.GetTraceRequest, stream api_v3.QueryService_GetTraceServer) error {
traceID, err := model.TraceIDFromString(request.GetTraceId())
if err != nil {
Expand All @@ -47,6 +49,7 @@ func (h *Handler) GetTrace(request *api_v3.GetTraceRequest, stream api_v3.QueryS
})
}

// FindTraces implements api_v3.QueryServiceServer's FindTraces
func (h *Handler) FindTraces(request *api_v3.FindTracesRequest, stream api_v3.QueryService_FindTracesServer) error {
query := request.GetQuery()
queryParams := &spanstore.TraceQueryParameters{
Expand Down Expand Up @@ -97,6 +100,7 @@ func (h *Handler) FindTraces(request *api_v3.FindTracesRequest, stream api_v3.Qu
return nil
}

// GetServices implements api_v3.QueryServiceServer's GetServices
func (h *Handler) GetServices(ctx context.Context, _ *api_v3.GetServicesRequest) (*api_v3.GetServicesResponse, error) {
services, err := h.QueryService.GetServices(ctx)
if err != nil {
Expand All @@ -107,6 +111,7 @@ func (h *Handler) GetServices(ctx context.Context, _ *api_v3.GetServicesRequest)
}, nil
}

// GetOperations implements api_v3.QueryService's GetOperations
func (h *Handler) GetOperations(ctx context.Context, request *api_v3.GetOperationsRequest) (*api_v3.GetOperationsResponse, error) {
operations, err := h.QueryService.GetOperations(ctx, spanstore.OperationQueryParameters{
ServiceName: request.GetService(),
Expand Down

0 comments on commit be579e5

Please sign in to comment.