Documentation ¶
Index ¶
- Variables
- func RegisterMonitorServer(s grpc.ServiceRegistrar, srv MonitorServer)
- type LoadAVG
- func (*LoadAVG) Descriptor() ([]byte, []int)deprecated
- func (x *LoadAVG) GetLoad1() float64
- func (x *LoadAVG) GetLoad15() float64
- func (x *LoadAVG) GetLoad5() float64
- func (*LoadAVG) ProtoMessage()
- func (x *LoadAVG) ProtoReflect() protoreflect.Message
- func (x *LoadAVG) Reset()
- func (x *LoadAVG) String() string
- type LoadCPU
- func (*LoadCPU) Descriptor() ([]byte, []int)deprecated
- func (x *LoadCPU) GetIdle() float64
- func (x *LoadCPU) GetSystem() float64
- func (x *LoadCPU) GetUser() float64
- func (*LoadCPU) ProtoMessage()
- func (x *LoadCPU) ProtoReflect() protoreflect.Message
- func (x *LoadCPU) Reset()
- func (x *LoadCPU) String() string
- type MonRequest
- func (*MonRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MonRequest) GetAveragedOver() uint32
- func (x *MonRequest) GetTimeout() uint32
- func (*MonRequest) ProtoMessage()
- func (x *MonRequest) ProtoReflect() protoreflect.Message
- func (x *MonRequest) Reset()
- func (x *MonRequest) String() string
- type MonitorClient
- type MonitorServer
- type Monitor_GetStatsClient
- type Monitor_GetStatsServer
- type StatSnapshot
- func (*StatSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *StatSnapshot) GetLavg() *LoadAVG
- func (x *StatSnapshot) GetLcpu() *LoadCPU
- func (*StatSnapshot) ProtoMessage()
- func (x *StatSnapshot) ProtoReflect() protoreflect.Message
- func (x *StatSnapshot) Reset()
- func (x *StatSnapshot) String() string
- type UnimplementedMonitorServer
- type UnsafeMonitorServer
Constants ¶
This section is empty.
Variables ¶
var File_sysmon_proto protoreflect.FileDescriptor
var Monitor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "monitor.Monitor", HandlerType: (*MonitorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "GetStats", Handler: _Monitor_GetStats_Handler, ServerStreams: true, }, }, Metadata: "sysmon.proto", }
Monitor_ServiceDesc is the grpc.ServiceDesc for Monitor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMonitorServer ¶
func RegisterMonitorServer(s grpc.ServiceRegistrar, srv MonitorServer)
Types ¶
type LoadAVG ¶
type LoadAVG struct { Load1 float64 `protobuf:"fixed64,1,opt,name=load1,proto3" json:"load1,omitempty"` Load5 float64 `protobuf:"fixed64,2,opt,name=load5,proto3" json:"load5,omitempty"` Load15 float64 `protobuf:"fixed64,3,opt,name=load15,proto3" json:"load15,omitempty"` // contains filtered or unexported fields }
Средняя загрузка системы за 1, 5 и 15 секунд
func (*LoadAVG) Descriptor
deprecated
func (*LoadAVG) ProtoMessage ¶
func (*LoadAVG) ProtoMessage()
func (*LoadAVG) ProtoReflect ¶
func (x *LoadAVG) ProtoReflect() protoreflect.Message
type LoadCPU ¶
type LoadCPU struct { User float64 `protobuf:"fixed64,1,opt,name=user,proto3" json:"user,omitempty"` System float64 `protobuf:"fixed64,2,opt,name=system,proto3" json:"system,omitempty"` Idle float64 `protobuf:"fixed64,3,opt,name=idle,proto3" json:"idle,omitempty"` // contains filtered or unexported fields }
Средняя загрузка процессора
func (*LoadCPU) Descriptor
deprecated
func (*LoadCPU) ProtoMessage ¶
func (*LoadCPU) ProtoMessage()
func (*LoadCPU) ProtoReflect ¶
func (x *LoadCPU) ProtoReflect() protoreflect.Message
type MonRequest ¶
type MonRequest struct { Timeout uint32 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"` AveragedOver uint32 `protobuf:"varint,2,opt,name=averaged_over,json=averagedOver,proto3" json:"averaged_over,omitempty"` // contains filtered or unexported fields }
Запрос от клиента к серверу
func (*MonRequest) Descriptor
deprecated
func (*MonRequest) Descriptor() ([]byte, []int)
Deprecated: Use MonRequest.ProtoReflect.Descriptor instead.
func (*MonRequest) GetAveragedOver ¶
func (x *MonRequest) GetAveragedOver() uint32
func (*MonRequest) GetTimeout ¶
func (x *MonRequest) GetTimeout() uint32
func (*MonRequest) ProtoMessage ¶
func (*MonRequest) ProtoMessage()
func (*MonRequest) ProtoReflect ¶
func (x *MonRequest) ProtoReflect() protoreflect.Message
func (*MonRequest) Reset ¶
func (x *MonRequest) Reset()
func (*MonRequest) String ¶
func (x *MonRequest) String() string
type MonitorClient ¶
type MonitorClient interface {
GetStats(ctx context.Context, in *MonRequest, opts ...grpc.CallOption) (Monitor_GetStatsClient, error)
}
MonitorClient is the client API for Monitor 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 NewMonitorClient ¶
func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient
type MonitorServer ¶
type MonitorServer interface { GetStats(*MonRequest, Monitor_GetStatsServer) error // contains filtered or unexported methods }
MonitorServer is the server API for Monitor service. All implementations must embed UnimplementedMonitorServer for forward compatibility
type Monitor_GetStatsClient ¶
type Monitor_GetStatsClient interface { Recv() (*StatSnapshot, error) grpc.ClientStream }
type Monitor_GetStatsServer ¶
type Monitor_GetStatsServer interface { Send(*StatSnapshot) error grpc.ServerStream }
type StatSnapshot ¶
type StatSnapshot struct { Lavg *LoadAVG `protobuf:"bytes,1,opt,name=lavg,proto3" json:"lavg,omitempty"` Lcpu *LoadCPU `protobuf:"bytes,2,opt,name=lcpu,proto3" json:"lcpu,omitempty"` // contains filtered or unexported fields }
Ответ от сервера клиенту
func (*StatSnapshot) Descriptor
deprecated
func (*StatSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use StatSnapshot.ProtoReflect.Descriptor instead.
func (*StatSnapshot) GetLavg ¶
func (x *StatSnapshot) GetLavg() *LoadAVG
func (*StatSnapshot) GetLcpu ¶
func (x *StatSnapshot) GetLcpu() *LoadCPU
func (*StatSnapshot) ProtoMessage ¶
func (*StatSnapshot) ProtoMessage()
func (*StatSnapshot) ProtoReflect ¶
func (x *StatSnapshot) ProtoReflect() protoreflect.Message
func (*StatSnapshot) Reset ¶
func (x *StatSnapshot) Reset()
func (*StatSnapshot) String ¶
func (x *StatSnapshot) String() string
type UnimplementedMonitorServer ¶
type UnimplementedMonitorServer struct { }
UnimplementedMonitorServer must be embedded to have forward compatible implementations.
func (UnimplementedMonitorServer) GetStats ¶
func (UnimplementedMonitorServer) GetStats(*MonRequest, Monitor_GetStatsServer) error
type UnsafeMonitorServer ¶
type UnsafeMonitorServer interface {
// contains filtered or unexported methods
}
UnsafeMonitorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MonitorServer will result in compilation errors.