Documentation ¶
Index ¶
- func PutSlab(s *Slab)
- type Config
- type Plan
- type Slab
- func (s *Slab) Done() error
- func (s *Slab) Fetch(ctx context.Context, client *utils.Client, mint, maxt int64, ...) (err error)
- func (s *Slab) IsEmpty() bool
- func (s *Slab) Maxt() int64
- func (s *Slab) Mint() int64
- func (s *Slab) PBarMax() int
- func (s *Slab) Series() []*prompb.TimeSeries
- func (s *Slab) SetDescription(description string, proceed int)
- func (s *Slab) UpdatePBarMax(steps int)
- func (s *Slab) UpdateProgressSeries(ts *prompb.TimeSeries) *prompb.TimeSeries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Mint int64 Maxt int64 SlabSizeLimitBytes int64 NumStores int ProgressEnabled bool JobName string ProgressMetricName string // Name for progress metric. ProgressClientConfig utils.ClientConfig HTTPConfig config.HTTPClientConfig LaIncrement time.Duration MaxReadDuration time.Duration HumanReadableTime bool }
Config represents configuration for the planner.
type Plan ¶
type Plan struct { // Test configs. Quiet bool // Avoid progress-bars during logs. TestCheckFunc func() // Helps peek into planner during testing. It is called at createSlab() to check the stats of the last slab. // contains filtered or unexported fields }
Plan represents the plannings done by the planner.
func Init ¶
Init creates an in-memory planner and initializes it. It is responsible for fetching the last pushed maxt and based on that, updates the mint for the provided migration.
func (*Plan) DecrementSlabCount ¶
func (p *Plan) DecrementSlabCount()
func (*Plan) LastMemoryFootprint ¶
func (*Plan) ShouldProceed ¶
ShouldProceed reports whether the fetching process should proceeds further. If any time-range is left to be fetched from the provided time-range, it returns true, else false.
type Slab ¶
type Slab struct {
// contains filtered or unexported fields
}
Slab represents an in-memory storage for data that is fetched by the reader.
func (*Slab) Fetch ¶
func (s *Slab) Fetch(ctx context.Context, client *utils.Client, mint, maxt int64, matchers []*labels.Matcher) (err error)
Fetch starts fetching the samples from remote read storage based on the matchers. It takes care of concurrent pulls as well.
func (*Slab) Series ¶
func (s *Slab) Series() []*prompb.TimeSeries
Series returns the time-series in the slab.
func (*Slab) SetDescription ¶
func (*Slab) UpdatePBarMax ¶
func (*Slab) UpdateProgressSeries ¶
func (s *Slab) UpdateProgressSeries(ts *prompb.TimeSeries) *prompb.TimeSeries
UpdateProgressSeries returns a time-series after appending a sample to the progress-metric.