redisstack

package
v0.0.0-...-aea5cd1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DupPolicyNone = DupPolicy(iota)
	DupPolicyBlock
	DupPolicyFirst
	DupPolicyLast
	DupPolicyMin
	DupPolicyMax
	DupPolicySum
)
View Source
const (
	AggregateTypeNone = AggregateType(iota)
	AggregateTypeAvg
	AggregateTypeFirst
	AggregateTypeLast
	AggregateTypeMin
	AggregateTypeMax
	AggregateTypeSum
	AggregateTypeRange
	AggregateTypeCount
	AggregateTypeStdP
	AggregateTypeStdS
	AggregateTypeVarP
	AggregateTypeVarS
	AggregateTypeTWA
)

Variables

This section is empty.

Functions

func AddArgs

func AddArgs(sample *Sample, option *Option) []any

func AlterArgs

func AlterArgs(key string, option *Option) []any

func CreateArgs

func CreateArgs(key string, option *Option) []any

func CreateRuleArgs

func CreateRuleArgs(srcKey string, destKey string, aggregateType AggregateType, alignTime *time.Duration) []any

func DelArgs

func DelArgs(key string, fromTime *time.Time, toTime *time.Time) []any

func DelResult

func DelResult(val any) (int64, error)

func DeleteRuleArgs

func DeleteRuleArgs(srcKey string, destKey string) []any

func GetArgs

func GetArgs(key string) []any

func MAddArgs

func MAddArgs(samples []*Sample) []any

func MAddResult

func MAddResult(val any) ([]*time.Time, error)

func MGetArgs

func MGetArgs(q *MultiQuery) []any

func MGetResult

func MGetResult(val any) (map[string]*MultiSample, error)

func MRangeArgs

func MRangeArgs(q *MultiQuery) []any

func MRangeResult

func MRangeResult(val any) (map[string]*MultiSample, error)

func MRevRangeArgs

func MRevRangeArgs(q *MultiQuery) []any

func MRevRangeResult

func MRevRangeResult(val any) (map[string]*MultiSample, error)

func QueryIndexArgs

func QueryIndexArgs(filters []string) []any

func QueryIndexResult

func QueryIndexResult(val any) ([]string, error)

func RangeArgs

func RangeArgs(key string, q *MultiQuery) []any

func RevRangeArgs

func RevRangeArgs(key string, q *MultiQuery) []any

Types

type AggregateType

type AggregateType byte

type DupPolicy

type DupPolicy byte

type MultiQuery

type MultiQuery struct {
	FromTime         *time.Time
	ToTime           *time.Time
	Latest           bool
	FiltersByTime    []*time.Time
	FilterByValueMin *float64
	FilterByValueMax *float64
	WithLabels       bool
	SelectedLabels   []string
	Count            *int
	Aggregation      *MultiQueryAggregation
	Filters          []string
	GroupByLabel     string
	Reducer          AggregateType
}

type MultiQueryAggregation

type MultiQueryAggregation struct {
	Align           string
	Aggregator      AggregateType
	BucketDuration  time.Duration
	BucketTimestamp string
	Empty           bool
}

type MultiSample

type MultiSample struct {
	Labels  [][2]string
	Samples []*Sample
}

type Option

type Option struct {
	Retention    *time.Duration
	Uncompressed bool
	ChunkSize    *int64
	DupPolicy    DupPolicy
	Labels       [][2]string
}

type Sample

type Sample struct {
	Key   string
	Time  *time.Time
	Value float64
}

func GetResult

func GetResult(val any) (*Sample, error)

func RangeResult

func RangeResult(val any) ([]*Sample, error)

func RevRangeResult

func RevRangeResult(val any) ([]*Sample, error)

Jump to

Keyboard shortcuts

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