Documentation ¶
Overview ¶
Package sysinfo defines the RPC interface for the sansshell SysInfo actions.
Index ¶
Constants ¶
const (
SysInfo_Uptime_FullMethodName = "/SysInfo.SysInfo/Uptime"
)
Variables ¶
var File_sysinfo_proto protoreflect.FileDescriptor
var SysInfo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "SysInfo.SysInfo", HandlerType: (*SysInfoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Uptime", Handler: _SysInfo_Uptime_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sysinfo.proto", }
SysInfo_ServiceDesc is the grpc.ServiceDesc for SysInfo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSysInfoServer ¶
func RegisterSysInfoServer(s grpc.ServiceRegistrar, srv SysInfoServer)
Types ¶
type SysInfoClient ¶
type SysInfoClient interface { // Uptime return Uptime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UptimeReply, error) }
SysInfoClient is the client API for SysInfo 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 NewSysInfoClient ¶
func NewSysInfoClient(cc grpc.ClientConnInterface) SysInfoClient
type SysInfoClientProxy ¶
type SysInfoClientProxy interface { SysInfoClient UptimeOneMany(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (<-chan *UptimeManyResponse, error) }
SysInfoClientProxy is the superset of SysInfoClient which additionally includes the OneMany proxy methods
func NewSysInfoClientProxy ¶
func NewSysInfoClientProxy(cc *proxy.Conn) SysInfoClientProxy
NewSysInfoClientProxy creates a SysInfoClientProxy for use in proxied connections. NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts.
type SysInfoServer ¶
type SysInfoServer interface { // Uptime return Uptime(context.Context, *emptypb.Empty) (*UptimeReply, error) }
SysInfoServer is the server API for SysInfo service. All implementations should embed UnimplementedSysInfoServer for forward compatibility
type UnimplementedSysInfoServer ¶
type UnimplementedSysInfoServer struct { }
UnimplementedSysInfoServer should be embedded to have forward compatible implementations.
func (UnimplementedSysInfoServer) Uptime ¶
func (UnimplementedSysInfoServer) Uptime(context.Context, *emptypb.Empty) (*UptimeReply, error)
type UnsafeSysInfoServer ¶
type UnsafeSysInfoServer interface {
// contains filtered or unexported methods
}
UnsafeSysInfoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SysInfoServer will result in compilation errors.
type UptimeManyResponse ¶
type UptimeManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *UptimeReply Error error }
UptimeManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type UptimeReply ¶
type UptimeReply struct { // show the uptime in protobuf.Duration UptimeSeconds *durationpb.Duration `protobuf:"bytes,1,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"` // contains filtered or unexported fields }
func (*UptimeReply) Descriptor
deprecated
func (*UptimeReply) Descriptor() ([]byte, []int)
Deprecated: Use UptimeReply.ProtoReflect.Descriptor instead.
func (*UptimeReply) GetUptimeSeconds ¶
func (x *UptimeReply) GetUptimeSeconds() *durationpb.Duration
func (*UptimeReply) ProtoMessage ¶
func (*UptimeReply) ProtoMessage()
func (*UptimeReply) ProtoReflect ¶
func (x *UptimeReply) ProtoReflect() protoreflect.Message
func (*UptimeReply) Reset ¶
func (x *UptimeReply) Reset()
func (*UptimeReply) String ¶
func (x *UptimeReply) String() string