monitor

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

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

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetName

func (x *Target) GetName() string

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

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

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

type UnimplementedMonitorServer

type UnimplementedMonitorServer struct {
}

UnimplementedMonitorServer must be embedded to have forward compatible implementations.

func (UnimplementedMonitorServer) GetResourceUsage

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