package environ import ( context "context" grpc "google.golang.org/grpc" ) // Server implements the EnvironmentServer type Server struct { UnimplementedEnvironmentSvcServer } // GetEnvironment responds with the information about the environment func (s *Server) GetEnvironment(context.Context, *Void) (*Environment, error) { rsp := &Environment{ Version: Version, GitCommit: GitCommit, BuildTime: BuildTime, GoOsArch: GoOsArch, ApiVersion: APIVersion, GoVersion: GoVersion, } return rsp, nil } // NewServer returns a new environ.Server func NewServer(grpcServer *grpc.Server) *Server { s := &Server{} RegisterEnvironmentSvcServer(grpcServer, s) return s }