don't expose services by default

This commit is contained in:
Willy Kloucek
2021-10-12 14:00:33 +02:00
parent 90246d776d
commit 879827ca4b
31 changed files with 94 additions and 114 deletions
-34
View File
@@ -1,34 +0,0 @@
package cmd
import (
"github.com/owncloud/ocis/ocis/pkg/runtime/config"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var (
rootCmd = &cobra.Command{
Use: "pman",
Short: "RPC Process Manager",
}
)
// RootCmd returns a configured root command.
func RootCmd(cfg *config.Config) *cobra.Command {
rootCmd.PersistentFlags().StringVarP(&cfg.Hostname, "hostname", "n", "localhost", "host with a running oCIS runtime.")
rootCmd.PersistentFlags().StringVarP(&cfg.Port, "port", "p", "10666", "port to send messages to the rpc oCIS runtime.")
rootCmd.PersistentFlags().BoolVarP(&cfg.KeepAlive, "keep-alive", "k", false, "restart supervised processes that abruptly die.")
if err := viper.BindPFlag("hostname", rootCmd.PersistentFlags().Lookup("hostname")); err != nil {
panic(err)
}
if err := viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")); err != nil {
panic(err)
}
rootCmd.AddCommand(List(cfg))
rootCmd.AddCommand(Run(cfg))
rootCmd.AddCommand(Kill(cfg))
return rootCmd
}