sysinfo

package
v1.20.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sysinfo defines the RPC interface for the sansshell SysInfo actions.

Index

Constants

View Source
const (
	SysInfo_Uptime_FullMethodName = "/SysInfo.SysInfo/Uptime"
)

Variables

View Source
var File_sysinfo_proto protoreflect.FileDescriptor
View Source
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

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

Directories

Path Synopsis
Package client provides the client interface for 'sysinfo'
Package client provides the client interface for 'sysinfo'
Package server implements the sansshell 'SysInfo' service.
Package server implements the sansshell 'SysInfo' service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL