Stats Go-API
import "givc/modules/api/stats"- Constants
- Variables
- func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer)
- func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
- func file_stats_stats_proto_init()
- func file_stats_stats_proto_rawDescGZIP() []byte
- func init()
- type LoadStats
- func (*LoadStats) Descriptor() ([]byte, []int)
- func (x *LoadStats) GetLoad15Min() float32
- func (x *LoadStats) GetLoad1Min() float32
- func (x *LoadStats) GetLoad5Min() float32
- func (*LoadStats) ProtoMessage()
- func (x *LoadStats) ProtoReflect() protoreflect.Message
- func (x *LoadStats) Reset()
- func (x *LoadStats) String() string
- type MemoryStats
- func (*MemoryStats) Descriptor() ([]byte, []int)
- func (x *MemoryStats) GetAvailable() uint64
- func (x *MemoryStats) GetCached() uint64
- func (x *MemoryStats) GetFree() uint64
- func (x *MemoryStats) GetTotal() uint64
- func (*MemoryStats) ProtoMessage()
- func (x *MemoryStats) ProtoReflect() protoreflect.Message
- func (x *MemoryStats) Reset()
- func (x *MemoryStats) String() string
- type ProcessStat
- func (*ProcessStat) Descriptor() ([]byte, []int)
- func (x *ProcessStat) GetName() string
- func (x *ProcessStat) GetResSetSize() uint64
- func (x *ProcessStat) GetSys() float32
- func (x *ProcessStat) GetUser() float32
- func (*ProcessStat) ProtoMessage()
- func (x *ProcessStat) ProtoReflect() protoreflect.Message
- func (x *ProcessStat) Reset()
- func (x *ProcessStat) String() string
- type ProcessStats
- func (*ProcessStats) Descriptor() ([]byte, []int)
- func (x *ProcessStats) GetCpuProcesses() []*ProcessStat
- func (x *ProcessStats) GetMemProcesses() []*ProcessStat
- func (x *ProcessStats) GetRunning() uint64
- func (x *ProcessStats) GetSysCycles() uint64
- func (x *ProcessStats) GetTotal() uint64
- func (x *ProcessStats) GetTotalCycles() uint64
- func (x *ProcessStats) GetUserCycles() uint64
- func (*ProcessStats) ProtoMessage()
- func (x *ProcessStats) ProtoReflect() protoreflect.Message
- func (x *ProcessStats) Reset()
- func (x *ProcessStats) String() string
- type StatsRequest
- type StatsResponse
- func (*StatsResponse) Descriptor() ([]byte, []int)
- func (x *StatsResponse) GetLoad() *LoadStats
- func (x *StatsResponse) GetMemory() *MemoryStats
- func (x *StatsResponse) GetProcess() *ProcessStats
- func (*StatsResponse) ProtoMessage()
- func (x *StatsResponse) ProtoReflect() protoreflect.Message
- func (x *StatsResponse) Reset()
- func (x *StatsResponse) String() string
- type StatsServiceClient
- type StatsServiceServer
- type UnimplementedStatsServiceServer
- type UnsafeStatsServiceServer
- type statsServiceClient
Constants
Section titled “Constants”const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))const ( StatsService_GetStats_FullMethodName = "/stats.StatsService/GetStats")This is a compile-time assertion to ensure that this generated file is compatible with the grpc package it is being compiled against. Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9const file_stats_stats_proto_rawDesc = "" + "\n" + "\x11stats/stats.proto\x12\x05stats\"\x0e\n" + "\fStatsRequest\"g\n" + "\vProcessStat\x12\x12\n" + "\x04Name\x18\x01 \x01(\tR\x04Name\x12\x12\n" + "\x04User\x18\x02 \x01(\x02R\x04User\x12\x10\n" + "\x03Sys\x18\x03 \x01(\x02R\x03Sys\x12\x1e\n" + "\n" + "ResSetSize\x18\x04 \x01(\x04R\n" + "ResSetSize\"\x8e\x02\n" + "\fProcessStats\x126\n" + "\fCpuProcesses\x18\x01 \x03(\v2\x12.stats.ProcessStatR\fCpuProcesses\x126\n" + "\fMemProcesses\x18\x02 \x03(\v2\x12.stats.ProcessStatR\fMemProcesses\x12\x14\n" + "\x05Total\x18\x03 \x01(\x04R\x05Total\x12\x18\n" + "\aRunning\x18\x04 \x01(\x04R\aRunning\x12\x1e\n" + "\n" + "UserCycles\x18\x05 \x01(\x04R\n" + "UserCycles\x12\x1c\n" + "\tSysCycles\x18\x06 \x01(\x04R\tSysCycles\x12 \n" + "\vTotalCycles\x18\a \x01(\x04R\vTotalCycles\"a\n" + "\tLoadStats\x12\x1a\n" + "\bLoad1Min\x18\x01 \x01(\x02R\bLoad1Min\x12\x1a\n" + "\bLoad5Min\x18\x02 \x01(\x02R\bLoad5Min\x12\x1c\n" + "\tLoad15Min\x18\x03 \x01(\x02R\tLoad15Min\"m\n" + "\vMemoryStats\x12\x14\n" + "\x05Total\x18\x01 \x01(\x04R\x05Total\x12\x12\n" + "\x04Free\x18\x02 \x01(\x04R\x04Free\x12\x1c\n" + "\tAvailable\x18\x03 \x01(\x04R\tAvailable\x12\x16\n" + "\x06Cached\x18\x04 \x01(\x04R\x06Cached\"\x90\x01\n" + "\rStatsResponse\x12*\n" + "\x06Memory\x18\x01 \x01(\v2\x12.stats.MemoryStatsR\x06Memory\x12$\n" + "\x04Load\x18\x02 \x01(\v2\x10.stats.LoadStatsR\x04Load\x12-\n" + "\aProcess\x18\x03 \x01(\v2\x13.stats.ProcessStatsR\aProcess2G\n" + "\fStatsService\x127\n" + "\bGetStats\x12\x13.stats.StatsRequest\x1a\x14.stats.StatsResponse\"\x00B\x18Z\x16givc/modules/api/statsb\x06proto3"Variables
Section titled “Variables”var ( file_stats_stats_proto_rawDescOnce sync.Once file_stats_stats_proto_rawDescData []byte)var File_stats_stats_proto protoreflect.FileDescriptorStatsService_ServiceDesc is the grpc.ServiceDesc for StatsService service. It’s only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var StatsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stats.StatsService", HandlerType: (*StatsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStats", Handler: _StatsService_GetStats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stats/stats.proto",}var file_stats_stats_proto_depIdxs = []int32{ 1, 1, 4, 3, 2, 0, 5, 6, 5, 5, 5, 0,}var file_stats_stats_proto_goTypes = []any{ (*StatsRequest)(nil), (*ProcessStat)(nil), (*ProcessStats)(nil), (*LoadStats)(nil), (*MemoryStats)(nil), (*StatsResponse)(nil),}var file_stats_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 6)func RegisterStatsServiceServer
Section titled “func RegisterStatsServiceServer”func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer)func _StatsService_GetStats_Handler
Section titled “func _StatsService_GetStats_Handler”func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)func file_stats_stats_proto_init
Section titled “func file_stats_stats_proto_init”func file_stats_stats_proto_init()func file_stats_stats_proto_rawDescGZIP
Section titled “func file_stats_stats_proto_rawDescGZIP”func file_stats_stats_proto_rawDescGZIP() []bytefunc init
Section titled “func init”func init()type LoadStats
Section titled “type LoadStats”type LoadStats struct { state protoimpl.MessageState `protogen:"open.v1"` Load1Min float32 `protobuf:"fixed32,1,opt,name=Load1Min,proto3" json:"Load1Min,omitempty"` Load5Min float32 `protobuf:"fixed32,2,opt,name=Load5Min,proto3" json:"Load5Min,omitempty"` Load15Min float32 `protobuf:"fixed32,3,opt,name=Load15Min,proto3" json:"Load15Min,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*LoadStats) Descriptor
Section titled “func (*LoadStats) Descriptor”func (*LoadStats) Descriptor() ([]byte, []int)Deprecated: Use LoadStats.ProtoReflect.Descriptor instead.
func (*LoadStats) GetLoad15Min
Section titled “func (*LoadStats) GetLoad15Min”func (x *LoadStats) GetLoad15Min() float32func (*LoadStats) GetLoad1Min
Section titled “func (*LoadStats) GetLoad1Min”func (x *LoadStats) GetLoad1Min() float32func (*LoadStats) GetLoad5Min
Section titled “func (*LoadStats) GetLoad5Min”func (x *LoadStats) GetLoad5Min() float32func (*LoadStats) ProtoMessage
Section titled “func (*LoadStats) ProtoMessage”func (*LoadStats) ProtoMessage()func (*LoadStats) ProtoReflect
Section titled “func (*LoadStats) ProtoReflect”func (x *LoadStats) ProtoReflect() protoreflect.Messagefunc (*LoadStats) Reset
Section titled “func (*LoadStats) Reset”func (x *LoadStats) Reset()func (*LoadStats) String
Section titled “func (*LoadStats) String”func (x *LoadStats) String() stringtype MemoryStats
Section titled “type MemoryStats”type MemoryStats struct { state protoimpl.MessageState `protogen:"open.v1"` Total uint64 `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"` Free uint64 `protobuf:"varint,2,opt,name=Free,proto3" json:"Free,omitempty"` Available uint64 `protobuf:"varint,3,opt,name=Available,proto3" json:"Available,omitempty"` Cached uint64 `protobuf:"varint,4,opt,name=Cached,proto3" json:"Cached,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*MemoryStats) Descriptor
Section titled “func (*MemoryStats) Descriptor”func (*MemoryStats) Descriptor() ([]byte, []int)Deprecated: Use MemoryStats.ProtoReflect.Descriptor instead.
func (*MemoryStats) GetAvailable
Section titled “func (*MemoryStats) GetAvailable”func (x *MemoryStats) GetAvailable() uint64func (*MemoryStats) GetCached
Section titled “func (*MemoryStats) GetCached”func (x *MemoryStats) GetCached() uint64func (*MemoryStats) GetFree
Section titled “func (*MemoryStats) GetFree”func (x *MemoryStats) GetFree() uint64func (*MemoryStats) GetTotal
Section titled “func (*MemoryStats) GetTotal”func (x *MemoryStats) GetTotal() uint64func (*MemoryStats) ProtoMessage
Section titled “func (*MemoryStats) ProtoMessage”func (*MemoryStats) ProtoMessage()func (*MemoryStats) ProtoReflect
Section titled “func (*MemoryStats) ProtoReflect”func (x *MemoryStats) ProtoReflect() protoreflect.Messagefunc (*MemoryStats) Reset
Section titled “func (*MemoryStats) Reset”func (x *MemoryStats) Reset()func (*MemoryStats) String
Section titled “func (*MemoryStats) String”func (x *MemoryStats) String() stringtype ProcessStat
Section titled “type ProcessStat”type ProcessStat struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` User float32 `protobuf:"fixed32,2,opt,name=User,proto3" json:"User,omitempty"` Sys float32 `protobuf:"fixed32,3,opt,name=Sys,proto3" json:"Sys,omitempty"` ResSetSize uint64 `protobuf:"varint,4,opt,name=ResSetSize,proto3" json:"ResSetSize,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*ProcessStat) Descriptor
Section titled “func (*ProcessStat) Descriptor”func (*ProcessStat) Descriptor() ([]byte, []int)Deprecated: Use ProcessStat.ProtoReflect.Descriptor instead.
func (*ProcessStat) GetName
Section titled “func (*ProcessStat) GetName”func (x *ProcessStat) GetName() stringfunc (*ProcessStat) GetResSetSize
Section titled “func (*ProcessStat) GetResSetSize”func (x *ProcessStat) GetResSetSize() uint64func (*ProcessStat) GetSys
Section titled “func (*ProcessStat) GetSys”func (x *ProcessStat) GetSys() float32func (*ProcessStat) GetUser
Section titled “func (*ProcessStat) GetUser”func (x *ProcessStat) GetUser() float32func (*ProcessStat) ProtoMessage
Section titled “func (*ProcessStat) ProtoMessage”func (*ProcessStat) ProtoMessage()func (*ProcessStat) ProtoReflect
Section titled “func (*ProcessStat) ProtoReflect”func (x *ProcessStat) ProtoReflect() protoreflect.Messagefunc (*ProcessStat) Reset
Section titled “func (*ProcessStat) Reset”func (x *ProcessStat) Reset()func (*ProcessStat) String
Section titled “func (*ProcessStat) String”func (x *ProcessStat) String() stringtype ProcessStats
Section titled “type ProcessStats”type ProcessStats struct { state protoimpl.MessageState `protogen:"open.v1"` CpuProcesses []*ProcessStat `protobuf:"bytes,1,rep,name=CpuProcesses,proto3" json:"CpuProcesses,omitempty"` MemProcesses []*ProcessStat `protobuf:"bytes,2,rep,name=MemProcesses,proto3" json:"MemProcesses,omitempty"` Total uint64 `protobuf:"varint,3,opt,name=Total,proto3" json:"Total,omitempty"` Running uint64 `protobuf:"varint,4,opt,name=Running,proto3" json:"Running,omitempty"` UserCycles uint64 `protobuf:"varint,5,opt,name=UserCycles,proto3" json:"UserCycles,omitempty"` SysCycles uint64 `protobuf:"varint,6,opt,name=SysCycles,proto3" json:"SysCycles,omitempty"` TotalCycles uint64 `protobuf:"varint,7,opt,name=TotalCycles,proto3" json:"TotalCycles,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*ProcessStats) Descriptor
Section titled “func (*ProcessStats) Descriptor”func (*ProcessStats) Descriptor() ([]byte, []int)Deprecated: Use ProcessStats.ProtoReflect.Descriptor instead.
func (*ProcessStats) GetCpuProcesses
Section titled “func (*ProcessStats) GetCpuProcesses”func (x *ProcessStats) GetCpuProcesses() []*ProcessStatfunc (*ProcessStats) GetMemProcesses
Section titled “func (*ProcessStats) GetMemProcesses”func (x *ProcessStats) GetMemProcesses() []*ProcessStatfunc (*ProcessStats) GetRunning
Section titled “func (*ProcessStats) GetRunning”func (x *ProcessStats) GetRunning() uint64func (*ProcessStats) GetSysCycles
Section titled “func (*ProcessStats) GetSysCycles”func (x *ProcessStats) GetSysCycles() uint64func (*ProcessStats) GetTotal
Section titled “func (*ProcessStats) GetTotal”func (x *ProcessStats) GetTotal() uint64func (*ProcessStats) GetTotalCycles
Section titled “func (*ProcessStats) GetTotalCycles”func (x *ProcessStats) GetTotalCycles() uint64func (*ProcessStats) GetUserCycles
Section titled “func (*ProcessStats) GetUserCycles”func (x *ProcessStats) GetUserCycles() uint64func (*ProcessStats) ProtoMessage
Section titled “func (*ProcessStats) ProtoMessage”func (*ProcessStats) ProtoMessage()func (*ProcessStats) ProtoReflect
Section titled “func (*ProcessStats) ProtoReflect”func (x *ProcessStats) ProtoReflect() protoreflect.Messagefunc (*ProcessStats) Reset
Section titled “func (*ProcessStats) Reset”func (x *ProcessStats) Reset()func (*ProcessStats) String
Section titled “func (*ProcessStats) String”func (x *ProcessStats) String() stringtype StatsRequest
Section titled “type StatsRequest”type StatsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*StatsRequest) Descriptor
Section titled “func (*StatsRequest) Descriptor”func (*StatsRequest) Descriptor() ([]byte, []int)Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.
func (*StatsRequest) ProtoMessage
Section titled “func (*StatsRequest) ProtoMessage”func (*StatsRequest) ProtoMessage()func (*StatsRequest) ProtoReflect
Section titled “func (*StatsRequest) ProtoReflect”func (x *StatsRequest) ProtoReflect() protoreflect.Messagefunc (*StatsRequest) Reset
Section titled “func (*StatsRequest) Reset”func (x *StatsRequest) Reset()func (*StatsRequest) String
Section titled “func (*StatsRequest) String”func (x *StatsRequest) String() stringtype StatsResponse
Section titled “type StatsResponse”type StatsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Memory *MemoryStats `protobuf:"bytes,1,opt,name=Memory,proto3" json:"Memory,omitempty"` Load *LoadStats `protobuf:"bytes,2,opt,name=Load,proto3" json:"Load,omitempty"` Process *ProcessStats `protobuf:"bytes,3,opt,name=Process,proto3" json:"Process,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}func (*StatsResponse) Descriptor
Section titled “func (*StatsResponse) Descriptor”func (*StatsResponse) Descriptor() ([]byte, []int)Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.
func (*StatsResponse) GetLoad
Section titled “func (*StatsResponse) GetLoad”func (x *StatsResponse) GetLoad() *LoadStatsfunc (*StatsResponse) GetMemory
Section titled “func (*StatsResponse) GetMemory”func (x *StatsResponse) GetMemory() *MemoryStatsfunc (*StatsResponse) GetProcess
Section titled “func (*StatsResponse) GetProcess”func (x *StatsResponse) GetProcess() *ProcessStatsfunc (*StatsResponse) ProtoMessage
Section titled “func (*StatsResponse) ProtoMessage”func (*StatsResponse) ProtoMessage()func (*StatsResponse) ProtoReflect
Section titled “func (*StatsResponse) ProtoReflect”func (x *StatsResponse) ProtoReflect() protoreflect.Messagefunc (*StatsResponse) Reset
Section titled “func (*StatsResponse) Reset”func (x *StatsResponse) Reset()func (*StatsResponse) String
Section titled “func (*StatsResponse) String”func (x *StatsResponse) String() stringtype StatsServiceClient
Section titled “type StatsServiceClient”StatsServiceClient is the client API for StatsService 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.
type StatsServiceClient interface { GetStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)}func NewStatsServiceClient
Section titled “func NewStatsServiceClient”func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClienttype StatsServiceServer
Section titled “type StatsServiceServer”StatsServiceServer is the server API for StatsService service. All implementations must embed UnimplementedStatsServiceServer for forward compatibility.
type StatsServiceServer interface { GetStats(context.Context, *StatsRequest) (*StatsResponse, error) mustEmbedUnimplementedStatsServiceServer()}type UnimplementedStatsServiceServer
Section titled “type UnimplementedStatsServiceServer”UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnimplementedStatsServiceServer struct{}func (UnimplementedStatsServiceServer) GetStats
Section titled “func (UnimplementedStatsServiceServer) GetStats”func (UnimplementedStatsServiceServer) GetStats(context.Context, *StatsRequest) (*StatsResponse, error)func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer
Section titled “func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer”func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer()func (UnimplementedStatsServiceServer) testEmbeddedByValue
Section titled “func (UnimplementedStatsServiceServer) testEmbeddedByValue”func (UnimplementedStatsServiceServer) testEmbeddedByValue()type UnsafeStatsServiceServer
Section titled “type UnsafeStatsServiceServer”UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StatsServiceServer will result in compilation errors.
type UnsafeStatsServiceServer interface { mustEmbedUnimplementedStatsServiceServer()}type statsServiceClient
Section titled “type statsServiceClient”type statsServiceClient struct { cc grpc.ClientConnInterface}func (*statsServiceClient) GetStats
Section titled “func (*statsServiceClient) GetStats”func (c *statsServiceClient) GetStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)Generated by gomarkdoc