helpers

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TpPrefix = "tp_" // tailpipe prefix for tailpipe specific columns

Variables

This section is empty.

Functions

func BuildFilterMap

func BuildFilterMap(filterString []string) (map[string]*filter.SqlFilter, error)

BuildFilterMap parses the provided filter strings and returns a map of field name to SQL filters. Note: this will fail if any filter refers to more than one field

func ExtractNamedGroupsFromGrok

func ExtractNamedGroupsFromGrok(grokPattern string) []string

ExtractNamedGroupsFromGrok extracts named groups from a Grok pattern

func GetFolderFileSize added in v0.5.0

func GetFolderFileSize(folderPath string) (int64, error)

GetFolderFileSize returns the total size of all files in the given folder in bytes (single level only)

func GetFolderFileSizeMb added in v0.5.0

func GetFolderFileSizeMb(folderPath string) (int64, error)

GetFolderFileSizeMb returns the total size of all files in the given folder in Mb (single level only)

func GetGranularityFromFileLayout

func GetGranularityFromFileLayout(fileLayout *string) time.Duration

GetGranularityFromFileLayout is a helper function to determine the granularity of the collection state based on the file layout

the 'granularity' means what it the shortest period we can determine that an artifact comes from based on its filename e.g., if the filename contains {year}/{month}/{day}/{hour}/{minute}, the granularity is 1 minute if the filename contains {year}/{month}/{day}/{hour}, the granularity is 1 hour NOTE: we traverse the time properties from largest to smallest

func SortColumnsAlphabetically added in v0.9.3

func SortColumnsAlphabetically(columns []string) []string

SortColumnsAlphabetically sorts the column names alphabetically but with tp_ fields on the end

Types

This section is empty.

Jump to

Keyboard shortcuts

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