Staffan Olsson 3 anos atrás
pai
commit
a582a62b99
1 arquivos alterados com 13 adições e 0 exclusões
  1. 13 0
      client.go

+ 13 - 0
client.go

@@ -11,6 +11,19 @@ import (
 	"google.golang.org/grpc"
 )
 
+// GetClientEnvironment returns the clients environment.
+func GetClientEnvironment() *Environment {
+	clientEnv := &Environment{
+		Version:    Version,
+		GitCommit:  GitCommit,
+		BuildTime:  BuildTime,
+		GoOsArch:   GoOsArch,
+		ApiVersion: APIVersion,
+		GoVersion:  runtime.Version(),
+	}
+	return clientEnv
+}
+
 // GetBuildInfo uses an existing grpc connection to request the server eviron and returns that with the client environ.
 func GetBuildInfo(conn *grpc.ClientConn, timeout time.Duration) (clientEnv *Environment, serverEnv *Environment, err error) {
 	clientEnv = &Environment{