Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "development"
View Source
var VersionCmd = &cobra.Command{ Use: "version", Short: "Shows the version of the Agent and CLI.", Run: func(cmd *cobra.Command, args []string) { req := api.VersionRequest{} port := viper.GetString("agent.port") conn, err := grpc.Dial("127.0.0.1:"+port, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { fmt.Println("Error connecting to GRPC Server: ", err) return } defer conn.Close() client := api.NewAgentClient(conn) versionResponse, err := client.Version(context.Background(), &req) if err != nil { shared.HandleAgentError(err, fmt.Sprintf("Error: Unable to complete Version command: %v", err)) return } fmt.Println("Pennsieve Agent") fmt.Println(fmt.Sprintf("Agent Version :%20s\n"+ "CLI Version :%20s\n"+ "Log Level :%20s\n", versionResponse.Version, Version, versionResponse.LogLevel)) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.