Documentation
¶
Index ¶
- Variables
- func GetBuildInfo(conn *grpc.ClientConn, timeout time.Duration) (clientEnv *Environment, serverEnv *Environment, err error)
- func PrintBuildInfo(out io.Writer, clientEnv, serverEnv *Environment)
- func RegisterEnvironmentSvcServer(s grpc.ServiceRegistrar, srv EnvironmentSvcServer)
- type Environment
- func (*Environment) Descriptor() ([]byte, []int)deprecated
- func (x *Environment) GetApiVersion() string
- func (x *Environment) GetBuildTime() string
- func (x *Environment) GetGitCommit() string
- func (x *Environment) GetGoOsArch() string
- func (x *Environment) GetGoVersion() string
- func (x *Environment) GetVersion() string
- func (*Environment) ProtoMessage()
- func (x *Environment) ProtoReflect() protoreflect.Message
- func (x *Environment) Reset()
- func (x *Environment) String() string
- type EnvironmentSvcClient
- type EnvironmentSvcServer
- type Server
- type UnimplementedEnvironmentSvcServer
- type UnsafeEnvironmentSvcServer
- type Void
Constants ¶
This section is empty.
Variables ¶
var ( // GitCommit is the commit of the build GitCommit string // BuildTime is the time the exe was built BuildTime string // GoOsArch is the OS/architecture for which the exe was built GoOsArch string // Version is the git tag of the source Version string // APIVersion is from api/version.txt APIVersion string // GoVersion is the current version of the go compiler GoVersion string )
var EnvironmentSvc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "environ.v1.EnvironmentSvc", HandlerType: (*EnvironmentSvcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetEnvironment", Handler: _EnvironmentSvc_GetEnvironment_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/environ/v1/env.proto", }
EnvironmentSvc_ServiceDesc is the grpc.ServiceDesc for EnvironmentSvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_environ_v1_env_proto protoreflect.FileDescriptor
Functions ¶
func GetBuildInfo ¶
func GetBuildInfo(conn *grpc.ClientConn, timeout time.Duration) (clientEnv *Environment, serverEnv *Environment, err error)
GetBuildInfo uses an existing grpc connection to request the server eviron and returns that with the client environ.
func PrintBuildInfo ¶
func PrintBuildInfo(out io.Writer, clientEnv, serverEnv *Environment)
PrintBuildInfo prints the environment for client and server, if they are defined
func RegisterEnvironmentSvcServer ¶
func RegisterEnvironmentSvcServer(s grpc.ServiceRegistrar, srv EnvironmentSvcServer)
Types ¶
type Environment ¶
type Environment struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` BuildTime string `protobuf:"bytes,3,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"` GoOsArch string `protobuf:"bytes,4,opt,name=go_os_arch,json=goOsArch,proto3" json:"go_os_arch,omitempty"` ApiVersion string `protobuf:"bytes,5,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` GoVersion string `protobuf:"bytes,6,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` // contains filtered or unexported fields }
func GetClientEnvironment ¶ added in v1.0.3
func GetClientEnvironment() *Environment
GetClientEnvironment returns the clients environment.
func (*Environment) Descriptor
deprecated
func (*Environment) Descriptor() ([]byte, []int)
Deprecated: Use Environment.ProtoReflect.Descriptor instead.
func (*Environment) GetApiVersion ¶
func (x *Environment) GetApiVersion() string
func (*Environment) GetBuildTime ¶
func (x *Environment) GetBuildTime() string
func (*Environment) GetGitCommit ¶
func (x *Environment) GetGitCommit() string
func (*Environment) GetGoOsArch ¶
func (x *Environment) GetGoOsArch() string
func (*Environment) GetGoVersion ¶
func (x *Environment) GetGoVersion() string
func (*Environment) GetVersion ¶
func (x *Environment) GetVersion() string
func (*Environment) ProtoMessage ¶
func (*Environment) ProtoMessage()
func (*Environment) ProtoReflect ¶
func (x *Environment) ProtoReflect() protoreflect.Message
func (*Environment) Reset ¶
func (x *Environment) Reset()
func (*Environment) String ¶
func (x *Environment) String() string
type EnvironmentSvcClient ¶
type EnvironmentSvcClient interface {
GetEnvironment(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Environment, error)
}
EnvironmentSvcClient is the client API for EnvironmentSvc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEnvironmentSvcClient ¶
func NewEnvironmentSvcClient(cc grpc.ClientConnInterface) EnvironmentSvcClient
type EnvironmentSvcServer ¶
type EnvironmentSvcServer interface { GetEnvironment(context.Context, *Void) (*Environment, error) // contains filtered or unexported methods }
EnvironmentSvcServer is the server API for EnvironmentSvc service. All implementations must embed UnimplementedEnvironmentSvcServer for forward compatibility
type Server ¶
type Server struct {
UnimplementedEnvironmentSvcServer
}
Server implements the EnvironmentServer
func (*Server) GetEnvironment ¶
GetEnvironment responds with the information about the environment
type UnimplementedEnvironmentSvcServer ¶
type UnimplementedEnvironmentSvcServer struct { }
UnimplementedEnvironmentSvcServer must be embedded to have forward compatible implementations.
func (UnimplementedEnvironmentSvcServer) GetEnvironment ¶
func (UnimplementedEnvironmentSvcServer) GetEnvironment(context.Context, *Void) (*Environment, error)
type UnsafeEnvironmentSvcServer ¶ added in v1.1.0
type UnsafeEnvironmentSvcServer interface {
// contains filtered or unexported methods
}
UnsafeEnvironmentSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EnvironmentSvcServer will result in compilation errors.
type Void ¶
type Void struct {
// contains filtered or unexported fields
}
func (*Void) Descriptor
deprecated
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()
func (*Void) ProtoReflect ¶
func (x *Void) ProtoReflect() protoreflect.Message