dependency

package
v2.1.63 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluginCmd = &cobra.Command{
	Use:               "plugin",
	Short:             "show plugin",
	Long:              `show the plugin details of dragonfly.`,
	Args:              cobra.NoArgs,
	DisableAutoGenTag: true,
	SilenceUsage:      true,
	Run: func(cmd *cobra.Command, args []string) {
		ListAvailableInTreePlugins()
		ListAvailableOutOfTreePlugins()
	},
}
View Source
var VersionCmd = &cobra.Command{
	Use:               "version",
	Short:             "show version",
	Long:              `show the version details of dragonfly.`,
	Args:              cobra.NoArgs,
	DisableAutoGenTag: true,
	SilenceUsage:      true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("MajorVersion:\t%s\n", version.Major)
		fmt.Printf("MinorVersion:\t%s\n", version.Minor)
		fmt.Printf("GitVersion:\t%s\n", version.GitVersion)
		fmt.Printf("GitCommit:\t%s\n", version.GitCommit)
		fmt.Printf("Platform:\t%s\n", version.Platform)
		fmt.Printf("BuildTime:\t%s\n", version.BuildTime)
		fmt.Printf("GoVersion:\t%s\n", version.GoVersion)
		fmt.Printf("Gotags:   \t%s\n", version.Gotags)
		fmt.Printf("Gogcflags:\t%s\n", version.Gogcflags)
	},
}

Functions

func InitCommandAndConfig added in v2.0.5

func InitCommandAndConfig(cmd *cobra.Command, useConfigFile bool, config any)

InitCommandAndConfig initializes flags binding and common sub cmds. config is a pointer to configuration struct.

func InitMonitor

func InitMonitor(pprofPort int, otelOption base.TelemetryOption) func()

InitMonitor initialize monitor and return final handler

func ListAvailableInTreePlugins added in v2.0.3

func ListAvailableInTreePlugins()

func ListAvailableOutOfTreePlugins added in v2.0.3

func ListAvailableOutOfTreePlugins()

func LoadConfig added in v2.0.5

func LoadConfig(config any) error

func SetupQuitSignalHandler

func SetupQuitSignalHandler(handler func())

func WatchConfig added in v2.0.5

func WatchConfig(interval time.Duration, newConfig func() (cfg any), watcher func(cfg any))

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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