aggregates

package
v0.9.28 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggrRequest

type AggrRequest struct {
	Version string `json:"version,omitempty"`
	TaskID  string `json:"task_id"`

	LastSequence  uint64    `json:"last_sequence"`
	FinalSequence uint64    `json:"final_sequence,omitempty"`
	MaxSequences  uint64    `json:"max_sequences,omitempty"`
	RetryCount    uint64    `json:"retry_count"`
	LastTime      time.Time `json:"last_time"`

	// Type is the datastore type; also the name of the datastore stream.
	Type string `json:"type"`
	// TargetType is the datastore stream type/name to write results to.
	TargetType string `json:"target_type"`
	// Maps expected field names to aggregation functions to appy to them.
	AggrMappings map[string][]string `json:"aggr_mappings"`

	Subtypes []string `json:"subtypes,omitempty"`
	// Include only is true, exclude only is false. This field should be ignored
	// if `Subtypes` is empty.
	IncludeExcludeOnly bool `json:"include_exclude_only,omitempty"`
	// If subtype last sequences differ from the rest of subtypes.
	SubtypeLastSequences map[string]uint64 `json:"subtype_last_sequences,omitempty"`

	IgnoreFinished bool `json:"ignore_finished"`
}

func (*AggrRequest) FromMapStringInterface

func (ar *AggrRequest) FromMapStringInterface(m map[string]interface{})

type AggrResponse

type AggrResponse struct {
	LastSequence uint64    `json:"last_sequence"`
	LastTime     time.Time `json:"last_time"`
	RetryCount   uint64    `json:"retry_count"`

	SubtypeLastSequences map[string]uint64 `json:"subtype_last_sequences,omitempty"`

	Error      []byte `json:"error"`
	Processing bool   `json:"processing"`
}

type AggrWorkerRequest

type AggrWorkerRequest struct {
	Type    string `json:"type"`
	Subtype string `json:"subtype"`
	// TargetType is the type of datastore stream that aggregates will be written to.
	TargetType string `json:"target_type"`
	// GroupType is the type of grouping that aggregations will use.
	GroupType string `json:"group_type"`
	// GroupParam is the parameter that is used to determine aggregation group boundaries.
	GroupParam string `json:"group_param"`
	// StartSequence is the sequence from which it will start reading from datastore.
	StartSequence uint64 `json:"start_sequence"`
	// MaxSequence is the final sequence that can be read during this aggregation iteration.
	MaxSequence uint64 `json:"max_sequence"`
	// FieldAggrFuncs map field names to aggregation function names (max, min, mean, etc).
	FieldAggrFuncs map[string][]string `json:"field_aggr_funcs"`
}

type AggrWorkerResponse

type AggrWorkerResponse struct {
	Type                string `json:"type"`
	Subtype             string `json:"subtype"`
	LastSequenceGrouped uint64 `json:"last_sequence_grouped"`
}

type SequenceRange

type SequenceRange struct {
	StartSequence uint64
	EndSequence   uint64
}

Jump to

Keyboard shortcuts

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