Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigKeyVersion = "main.version" ConfigKeyCommit = "main.commit" ConfigKeyDate = "main.date" ConfigKeyBuiltBy = "main.builtBy" LocalBuild = DefaultBuiltBy )
View Source
const ( DefaultVersion = "0.0.0" DefaultCommit = "none" DefaultDate = "unknown" DefaultBuiltBy = "local" )
View Source
const ( TailpipeDbName = "tailpipe.db" DbFileMaxAge = 24 * time.Hour )
View Source
const ( TailpipeShortDescription = "Collect, store and analyze log data using SQL" TailpipeLongDescription = `` /* 744-byte string literal not displayed */ )
View Source
const ( EnvPluginStartTimeout = "TAILPIPE_PLUGIN_START_TIMEOUT" // EnvConfigDump is an undocumented variable that is used to test config precedence EnvConfigDump = "TAILPIPE_CONFIG_DUMP" )
View Source
const ( HistoryFile = "history.json" // File to store historical data HistorySize = 500 // Number of historical records to store )
Constants for History
View Source
const ( //CmdTableList = ".tables" // List all tables CmdOutput = ".output" // Set output mode //CmdTiming = ".timing" // Toggle query timer CmdHeaders = ".header" // Toggle headers output CmdSeparator = ".separator" // Set the column separator CmdExit = ".exit" // Exit the interactive prompt CmdQuit = ".quit" // Alias for .exit CmdInspect = ".inspect" // inspect CmdMulti = ".multi" // toggle multi line query CmdClear = ".clear" // clear the console CmdHelp = ".help" // list all meta commands CmdAutoComplete = ".autocomplete" // enable or disable auto complete TpPrefix = "tp_" // tailpipe prefix for tailpipe specific columns )
View Source
const ( // MinCorePluginVersion should be set for production releases - it is the minimum version of the core plugin that is required MinCorePluginVersion = "v0.2.10" // CorePluginVersion may be set for pre-release versions - it allows us to pin a pre-release version of the core plugin // NOTE: they must NOT both be set CorePluginVersion = "" // TailpipeHubOCIBase is the tailpipe hub URL TailpipeHubOCIBase = "hub.tailpipe.io/" // BaseImageRef is the prefix for all tailpipe plugin images BaseImageRef = "ghcr.io/turbot/tailpipe" )
Variables ¶
View Source
var ConnectOutputModeIds = map[ConnectOutputMode][]string{ ConnectOutputModeJson: {constants.OutputFormatJSON}, ConnectOutputModeText: {constants.OutputFormatText}, }
View Source
var DuckDbExtensions = []string{"json", "inet"}
View Source
var GrokConfigProperties = []string{"log_format", "file_layout"}
View Source
var PluginOutputModeIds = map[PluginOutputMode][]string{ PluginOutputModeJson: {constants.OutputFormatJSON}, PluginOutputModePretty: {constants.OutputFormatPretty}, PluginOutputModePlain: {constants.OutputFormatPlain}, }
View Source
var QueryOutputModeIds = map[QueryOutputMode][]string{ QueryOutputModeCsv: {constants.OutputFormatCSV}, QueryOutputModeJson: {constants.OutputFormatJSON}, QueryOutputModeLine: {constants.OutputFormatLine}, QueryOutputModeTable: {constants.OutputFormatTable}, }
View Source
var SourceFileExtensions = []string{".jsonl"}
Functions ¶
func CorePluginFullName ¶
func CorePluginFullName() string
func CorePluginInstallStream ¶ added in v0.6.0
func CorePluginInstallStream() string
CorePluginInstallStream returns the plugin stream used to install the core plugin under normal circumstances (i.e. if MinCorePluginVersion is set) this is "core@latest"
func CorePluginRequiredVersionConstraint ¶ added in v0.6.0
func CorePluginRequiredVersionConstraint() (requiredConstraint string)
CorePluginRequiredVersionConstraint returns a version constraint for the required core plugin version normally we set the core version by setting constants.MinCorePluginVersion However if we want ot pin to a specific version (e.g. an rc version) we can set constants.CorePluginVersion instead one of constants.CorePluginVersion and constants.MinCorePluginVersion may be set if both are set this is a bug
func FlagValues ¶
func FlagValues[T comparable](mappings map[T][]string) []string
Types ¶
type ConnectOutputMode ¶
type ConnectOutputMode enumflag.Flag
const ( ConnectOutputModeJson ConnectOutputMode = iota ConnectOutputModeText )
type PluginOutputMode ¶
type PluginOutputMode enumflag.Flag
const ( PluginOutputModeJson PluginOutputMode = iota PluginOutputModePretty PluginOutputModePlain )
type QueryOutputMode ¶
type QueryOutputMode enumflag.Flag
const ( QueryOutputModeCsv QueryOutputMode = iota QueryOutputModeJson QueryOutputModeLine QueryOutputModeTable )
Click to show internal directories.
Click to hide internal directories.