Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "docker-popd", Short: "docker-popd server", Long: `docker-popd is a service that allows OpenBaton to orchestrate and deploy NFV on Docker containers.`, Run: func(cmd *cobra.Command, args []string) { if err := loadConfig(); err != nil { log.WithError(err).Fatal("cannot load configuration file") } srv, err := server.New() if err != nil { log.WithError(err).Fatal("failure while launching popd") } if prof != "" { if !profilingSupport { srv.Logger.Fatal("profiling has not been enabled at compile time") } srv.Logger.WithField("prof-connstr", prof).Debug("attempting to setting up HTTP live profiler") go func() { if err := http.ListenAndServe(prof, nil); err != nil { srv.Logger.WithError(err).Error("error with http profiling server") } }() } sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt) join := make(chan struct{}) go func() { <-sigChan if err := srv.Close(); err != nil { srv.Logger.WithError(err).Fatal("failure while stopping popd") } close(join) }() if err := srv.Serve(); err != nil { srv.Logger.WithError(err).Fatal("failure while running popd") } <-join }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.