Documentation ¶
Index ¶
- Variables
- func RegisterMonitorServer(s grpc.ServiceRegistrar, srv MonitorServer)
- type MonitorClient
- type MonitorServer
- type ResourceUsage
- func (*ResourceUsage) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceUsage) GetCpu() uint64
- func (x *ResourceUsage) GetMemory() uint64
- func (*ResourceUsage) ProtoMessage()
- func (x *ResourceUsage) ProtoReflect() protoreflect.Message
- func (x *ResourceUsage) Reset()
- func (x *ResourceUsage) String() string
- type Target
- type UnimplementedMonitorServer
- type UnsafeMonitorServer
Constants ¶
This section is empty.
Variables ¶
var File_pkg_runner_monitor_monitor_proto protoreflect.FileDescriptor
var Monitor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "monitor.Monitor", HandlerType: (*MonitorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetResourceUsage", Handler: _Monitor_GetResourceUsage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/runner/monitor/monitor.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 MonitorClient ¶
type MonitorClient interface {
GetResourceUsage(ctx context.Context, in *Target, opts ...grpc.CallOption) (*ResourceUsage, 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 NewDumyMonitor ¶
func NewDumyMonitor() MonitorClient
func NewMonitorClient ¶
func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient
type MonitorServer ¶
type MonitorServer interface { GetResourceUsage(context.Context, *Target) (*ResourceUsage, error) // contains filtered or unexported methods }
MonitorServer is the server API for Monitor service. All implementations must embed UnimplementedMonitorServer for forward compatibility
type ResourceUsage ¶
type ResourceUsage struct { Memory uint64 `protobuf:"varint,1,opt,name=memory,proto3" json:"memory,omitempty"` Cpu uint64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` // contains filtered or unexported fields }
func (*ResourceUsage) Descriptor
deprecated
func (*ResourceUsage) Descriptor() ([]byte, []int)
Deprecated: Use ResourceUsage.ProtoReflect.Descriptor instead.
func (*ResourceUsage) GetCpu ¶
func (x *ResourceUsage) GetCpu() uint64
func (*ResourceUsage) GetMemory ¶
func (x *ResourceUsage) GetMemory() uint64
func (*ResourceUsage) ProtoMessage ¶
func (*ResourceUsage) ProtoMessage()
func (*ResourceUsage) ProtoReflect ¶
func (x *ResourceUsage) ProtoReflect() protoreflect.Message
func (*ResourceUsage) Reset ¶
func (x *ResourceUsage) Reset()
func (*ResourceUsage) String ¶
func (x *ResourceUsage) String() string
type Target ¶
type Target struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Target) Descriptor
deprecated
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶
func (x *Target) ProtoReflect() protoreflect.Message
type UnimplementedMonitorServer ¶
type UnimplementedMonitorServer struct { }
UnimplementedMonitorServer must be embedded to have forward compatible implementations.
func (UnimplementedMonitorServer) GetResourceUsage ¶
func (UnimplementedMonitorServer) GetResourceUsage(context.Context, *Target) (*ResourceUsage, 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.