github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/storage/storage_exemplars_query.go (about)

     1  package storage
     2  
     3  import (
     4  	"context"
     5  	"time"
     6  
     7  	"github.com/pyroscope-io/pyroscope/pkg/flameql"
     8  	"github.com/pyroscope-io/pyroscope/pkg/storage/heatmap"
     9  	"github.com/pyroscope-io/pyroscope/pkg/storage/metadata"
    10  	"github.com/pyroscope-io/pyroscope/pkg/storage/tree"
    11  )
    12  
    13  type QueryExemplarsInput struct {
    14  	Query     *flameql.Query
    15  	StartTime time.Time
    16  	EndTime   time.Time
    17  
    18  	ExemplarsSelection ExemplarsSelection
    19  	HeatmapParams      heatmap.HeatmapParams
    20  }
    21  
    22  type ExemplarsSelection struct {
    23  	StartTime time.Time
    24  	EndTime   time.Time
    25  	MinValue  uint64
    26  	MaxValue  uint64
    27  }
    28  
    29  type QueryExemplarsOutput struct {
    30  	Tree          *tree.Tree
    31  	Count         uint64
    32  	Metadata      metadata.Metadata
    33  	HeatmapSketch heatmap.HeatmapSketch
    34  	Telemetry     map[string]interface{}
    35  }
    36  
    37  func (*Storage) QueryExemplars(context.Context, QueryExemplarsInput) (QueryExemplarsOutput, error) {
    38  	// FIXME(kolesnikovae): Not implemented.
    39  	return QueryExemplarsOutput{Tree: tree.New()}, nil
    40  }