timebased

package
v1.6.0-community Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEntryToTable

func AddEntryToTable(cEntry *TableEntry, tableList *list.List)

func AddEntryToTables

func AddEntryToTables(indexKeyStructs map[string]*IndexKeyTable, entry config.GenericMap, nowInSecs time.Time)

func DeleteOldEntriesFromTables

func DeleteOldEntriesFromTables(indexKeyStructs map[string]*IndexKeyTable, nowInSecs time.Time)

func PrintTable

func PrintTable(l *list.List)

Types

type DataTableMap

type DataTableMap map[string]*list.List

type FilterStruct

type FilterStruct struct {
	Rule              api.TimebasedFilterRule
	IndexKeyDataTable *IndexKeyTable
	Results           filterOperationResults
	Output            []filterOperationResult
}

func CreateIndexKeysAndFilters

func CreateIndexKeysAndFilters(rules []api.TimebasedFilterRule) (map[string]*IndexKeyTable, []FilterStruct)

CreateIndexKeysAndFilters creates structures for each IndexKey that appears in the rules. Note that the same IndexKey might appear in more than one Rule. Connect IndexKey structure to its filters. For each IndexKey, we need a table of history to handle the largest TimeInterval.

func (*FilterStruct) CalculateResults

func (fs *FilterStruct) CalculateResults(nowInSecs time.Time)

func (*FilterStruct) CalculateValue

func (fs *FilterStruct) CalculateValue(l *list.List, oldestValidTime time.Time) float64

func (*FilterStruct) ComputeTopkBotk

func (fs *FilterStruct) ComputeTopkBotk()

func (*FilterStruct) CreateGenericMap

func (fs *FilterStruct) CreateGenericMap() []config.GenericMap

type IndexKeyTable

type IndexKeyTable struct {
	// contains filtered or unexported fields
}

type TableEntry

type TableEntry struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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