pb

package
v0.0.0-...-2e0ea78 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_sysmon_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use LoadAVG.ProtoReflect.Descriptor instead.

func (*LoadAVG) GetLoad1

func (x *LoadAVG) GetLoad1() float64

func (*LoadAVG) GetLoad15

func (x *LoadAVG) GetLoad15() float64

func (*LoadAVG) GetLoad5

func (x *LoadAVG) GetLoad5() float64

func (*LoadAVG) ProtoMessage

func (*LoadAVG) ProtoMessage()

func (*LoadAVG) ProtoReflect

func (x *LoadAVG) ProtoReflect() protoreflect.Message

func (*LoadAVG) Reset

func (x *LoadAVG) Reset()

func (*LoadAVG) String

func (x *LoadAVG) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LoadCPU.ProtoReflect.Descriptor instead.

func (*LoadCPU) GetIdle

func (x *LoadCPU) GetIdle() float64

func (*LoadCPU) GetSystem

func (x *LoadCPU) GetSystem() float64

func (*LoadCPU) GetUser

func (x *LoadCPU) GetUser() float64

func (*LoadCPU) ProtoMessage

func (*LoadCPU) ProtoMessage()

func (*LoadCPU) ProtoReflect

func (x *LoadCPU) ProtoReflect() protoreflect.Message

func (*LoadCPU) Reset

func (x *LoadCPU) Reset()

func (*LoadCPU) String

func (x *LoadCPU) String() string

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

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.

Jump to

Keyboard shortcuts

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