planner

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinTime = time.Unix(0, 0)
	MaxTime = time.Unix(maxSec, maxNanosec)
)

Functions

func ElementsEqual

func ElementsEqual(left, right []io.EnumElementType) (isEqual bool)

Types

type DateRange

type DateRange struct {
	Start, End time.Time
}

func NewDateRange

func NewDateRange() *DateRange

type ParseResult

type ParseResult struct {
	QualifiedFiles  []QualifiedFile
	Limit           *RowLimit
	Range           *DateRange
	IntervalsPerDay int64
	RootDir         string
	TimeQuals       []TimeQualFunc
}

func NewParseResult

func NewParseResult() *ParseResult

func (*ParseResult) GetDataShapes

func (pr *ParseResult) GetDataShapes() (dsv map[io.TimeBucketKey][]io.DataShape)

func (*ParseResult) GetRecordType added in v4.0.1

func (pr *ParseResult) GetRecordType() (rt map[io.TimeBucketKey]io.EnumRecordType)

func (*ParseResult) GetRowLen

func (pr *ParseResult) GetRowLen() (rlenMap map[io.TimeBucketKey]int)

type QualifiedFile

type QualifiedFile struct {
	Key  io.TimeBucketKey
	File *io.TimeBucketInfo
}

type Query

type Query struct {
	Range       *DateRange
	Restriction RestrictionList
	Limit       *RowLimit
	DataDir     *catalog.Directory
	TimeQuals   []TimeQualFunc
}

func NewQuery

func NewQuery(d *catalog.Directory) *Query

func (*Query) AddRestriction added in v4.1.13

func (q *Query) AddRestriction(category, item string)

func (*Query) AddTargetKey added in v4.1.13

func (q *Query) AddTargetKey(key *io.TimeBucketKey)

func (*Query) AddTimeQual added in v4.1.13

func (q *Query) AddTimeQual(timeQual TimeQualFunc)

func (*Query) Parse added in v4.1.13

func (q *Query) Parse() (pr *ParseResult, err error)

func (*Query) SetEnd added in v4.1.13

func (q *Query) SetEnd(end time.Time)

func (*Query) SetRange added in v4.1.13

func (q *Query) SetRange(start, end time.Time)

func (*Query) SetRowLimit added in v4.1.13

func (q *Query) SetRowLimit(direction io.DirectionEnum, rowLimit int)

func (*Query) SetStart added in v4.1.13

func (q *Query) SetStart(start time.Time)

type RestrictionList

type RestrictionList map[string][]string // Key is category, items list is target

func NewRestrictionList

func NewRestrictionList() RestrictionList

func (RestrictionList) AddRestriction

func (r RestrictionList) AddRestriction(category, item string)

func (RestrictionList) GetRestrictionMap

func (r RestrictionList) GetRestrictionMap() RestrictionList

type RowLimit

type RowLimit struct {
	Number int32
	// -1 backward, 1 forward
	Direction io.DirectionEnum
}

func NewRowLimit

func NewRowLimit() *RowLimit

type TimeQualFunc

type TimeQualFunc func(epoch int64) bool

Jump to

Keyboard shortcuts

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