storage

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default     = IterateStyle(0)
	SearchAfter = IterateStyle(1)
	Scroll      = IterateStyle(2)
)
View Source
const (
	AggregationHistogram = AggregationType("histogram")
	AggregationTerms     = AggregationType("terms")
)

Variables

View Source
var DefaultComparer = Comparer{}

DefaultComparer

Functions

func Compare added in v1.4.0

func Compare(al, bl *pb.LogItem) int

Compare .

Types

type Aggregation added in v1.5.0

type Aggregation struct {
	*Selector
	Aggs []*AggregationDescriptor
}

type AggregationBucket added in v1.5.0

type AggregationBucket struct {
	Key   interface{}
	Count int64
}

type AggregationDescriptor added in v1.5.0

type AggregationDescriptor struct {
	Name    string
	Field   string
	Typ     AggregationType
	Options interface{}
}

type AggregationResponse added in v1.5.0

type AggregationResponse struct {
	Total        int64
	Aggregations map[string]*AggregationResult
}

type AggregationResult added in v1.5.0

type AggregationResult struct {
	Buckets []*AggregationBucket
}

type AggregationType added in v1.5.0

type AggregationType string

type Aggregator added in v1.5.0

type Aggregator interface {
	Aggregate(ctx context.Context, req *Aggregation) (*AggregationResponse, error)
}

type Comparer added in v1.4.0

type Comparer struct{}

Comparer .

func (Comparer) Compare added in v1.4.0

func (c Comparer) Compare(a, b interface{}) int

type Filter added in v1.4.0

type Filter struct {
	Key   string
	Op    Operator
	Value interface{}
}

Filter .

type HistogramAggOptions added in v1.5.0

type HistogramAggOptions struct {
	PreferredPoints int64
	MinimumInterval int64
	FixedInterval   int64
}

type IterateStyle added in v1.5.0

type IterateStyle int32

type Logs added in v1.4.0

type Logs []*pb.LogItem

Logs .

func (Logs) Len added in v1.4.0

func (l Logs) Len() int

func (Logs) Less added in v1.4.0

func (l Logs) Less(i, j int) bool

func (Logs) Swap added in v1.4.0

func (l Logs) Swap(i, j int)

type Operator added in v1.4.0

type Operator int32

Operator .

const (
	// EQ equal
	EQ Operator = iota
	REGEXP
	EXPRESSION
)

type QueryMeta added in v1.5.0

type QueryMeta struct {
	OrgNames              []string
	MspEnvIds             []string
	Highlight             bool
	PreferredBufferSize   int
	PreferredIterateStyle IterateStyle
}

type ResultSkip added in v1.5.0

type ResultSkip struct {
	AfterId    *UniqueId
	FromOffset int
}

type Selector added in v1.4.0

type Selector struct {
	Start   int64
	End     int64
	Scheme  string
	Filters []*Filter
	Debug   bool
	Meta    QueryMeta
	Skip    ResultSkip
	Options map[string]interface{}
}

Selector .

type Storage added in v1.4.0

type Storage interface {
	NewWriter(ctx context.Context) (storekit.BatchWriter, error)
	Iterator(ctx context.Context, sel *Selector) (storekit.Iterator, error)
}

Storage .

type TermsAggOptions added in v1.5.0

type TermsAggOptions struct {
	Size    int64
	Missing interface{}
}

type UniqueId added in v1.5.0

type UniqueId struct {
	Timestamp int64
	Id        string
	Offset    int64
}

func (*UniqueId) Raw added in v1.5.0

func (id *UniqueId) Raw() []interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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