constants

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

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 DuckDbExtensions = []string{"json", "inet"}
View Source
var GrokConfigProperties = []string{"log_format", "file_layout"}
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
)

Jump to

Keyboard shortcuts

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