analyzer

package
v0.0.0-...-1d39891 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnalyzerCmd = &cobra.Command{
	Use:          "analyzer",
	Short:        "Skydive analyzer",
	Long:         "Skydive analyzer",
	SilenceUsage: true,
	Run: func(cmd *cobra.Command, args []string) {
		config.Set("logging.id", "analyzer")
		logging.GetLogger().Noticef("Skydive Analyzer %s starting...", version.Version)

		server, err := analyzer.NewServerFromConfig()
		if err != nil {
			fmt.Fprintf(os.Stderr, "Failed to create analyzer: %s", err)
			os.Exit(1)
		}

		if err := server.Start(); err != nil {
			fmt.Fprintf(os.Stderr, "Failed to start analyzer: %s", err)
			os.Exit(1)
		}

		logging.GetLogger().Notice("Skydive Analyzer started !")
		ch := make(chan os.Signal)
		signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM)
		<-ch

		server.Stop()

		logging.GetLogger().Notice("Skydive Analyzer stopped.")
	},
}

AnalyzerCmd describes the skydive analyzer root command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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