Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSystemInterfaceHTTPServer(s *http.Server, srv SystemInterfaceHTTPServer)
- func RegisterSystemInterfaceServer(s grpc.ServiceRegistrar, srv SystemInterfaceServer)
- type LogRequest
- type LogResponse
- type System
- func (*System) Descriptor() ([]byte, []int)deprecated
- func (x *System) GetArch() string
- func (x *System) GetContainer() string
- func (x *System) GetCpu() int32
- func (x *System) GetDataDisk() int32
- func (x *System) GetGpu() int32
- func (x *System) GetGpuSpec() string
- func (x *System) GetId() int64
- func (x *System) GetInternalIp() string
- func (x *System) GetKernel() string
- func (x *System) GetKubeProxy() string
- func (x *System) GetKubelet() string
- func (x *System) GetMemory() int32
- func (x *System) GetOs() string
- func (*System) ProtoMessage()
- func (x *System) ProtoReflect() protoreflect.Message
- func (x *System) Reset()
- func (x *System) String() string
- type SystemInterfaceClient
- type SystemInterfaceHTTPClient
- type SystemInterfaceHTTPClientImpl
- type SystemInterfaceHTTPServer
- type SystemInterfaceServer
- type SystemInterface_GetLogsClient
- type SystemInterface_GetLogsServer
- type UnimplementedSystemInterfaceServer
- func (UnimplementedSystemInterfaceServer) GetLogs(grpc.BidiStreamingServer[LogRequest, LogResponse]) error
- func (UnimplementedSystemInterfaceServer) GetSystem(context.Context, *emptypb.Empty) (*System, error)
- func (UnimplementedSystemInterfaceServer) Ping(context.Context, *emptypb.Empty) (*common.Msg, error)
- type UnsafeSystemInterfaceServer
Constants ¶
const ( SystemInterface_Ping_FullMethodName = "/system.v1alpha1.SystemInterface/Ping" SystemInterface_GetSystem_FullMethodName = "/system.v1alpha1.SystemInterface/GetSystem" SystemInterface_GetLogs_FullMethodName = "/system.v1alpha1.SystemInterface/GetLogs" )
const OperationSystemInterfaceGetSystem = "/system.v1alpha1.SystemInterface/GetSystem"
const OperationSystemInterfacePing = "/system.v1alpha1.SystemInterface/Ping"
Variables ¶
var File_api_system_v1alpha1_message_proto protoreflect.FileDescriptor
var File_api_system_v1alpha1_system_proto protoreflect.FileDescriptor
var SystemInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "system.v1alpha1.SystemInterface", HandlerType: (*SystemInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _SystemInterface_Ping_Handler, }, { MethodName: "GetSystem", Handler: _SystemInterface_GetSystem_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetLogs", Handler: _SystemInterface_GetLogs_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/system/v1alpha1/system.proto", }
SystemInterface_ServiceDesc is the grpc.ServiceDesc for SystemInterface service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSystemInterfaceHTTPServer ¶
func RegisterSystemInterfaceHTTPServer(s *http.Server, srv SystemInterfaceHTTPServer)
func RegisterSystemInterfaceServer ¶
func RegisterSystemInterfaceServer(s grpc.ServiceRegistrar, srv SystemInterfaceServer)
Types ¶
type LogRequest ¶
type LogRequest struct { TailLines int32 `protobuf:"varint,1,opt,name=tail_lines,proto3" json:"tail_lines,omitempty"` // contains filtered or unexported fields }
func (*LogRequest) Descriptor
deprecated
func (*LogRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogRequest.ProtoReflect.Descriptor instead.
func (*LogRequest) GetTailLines ¶
func (x *LogRequest) GetTailLines() int32
func (*LogRequest) ProtoMessage ¶
func (*LogRequest) ProtoMessage()
func (*LogRequest) ProtoReflect ¶
func (x *LogRequest) ProtoReflect() protoreflect.Message
func (*LogRequest) Reset ¶
func (x *LogRequest) Reset()
func (*LogRequest) String ¶
func (x *LogRequest) String() string
type LogResponse ¶
type LogResponse struct { Log string `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"` // contains filtered or unexported fields }
func (*LogResponse) Descriptor
deprecated
func (*LogResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogResponse.ProtoReflect.Descriptor instead.
func (*LogResponse) GetLog ¶
func (x *LogResponse) GetLog() string
func (*LogResponse) ProtoMessage ¶
func (*LogResponse) ProtoMessage()
func (*LogResponse) ProtoReflect ¶
func (x *LogResponse) ProtoReflect() protoreflect.Message
func (*LogResponse) Reset ¶
func (x *LogResponse) Reset()
func (*LogResponse) String ¶
func (x *LogResponse) String() string
type System ¶
type System struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"` Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"` Cpu int32 `protobuf:"varint,4,opt,name=cpu,proto3" json:"cpu,omitempty"` Memory int32 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"` Gpu int32 `protobuf:"varint,6,opt,name=gpu,proto3" json:"gpu,omitempty"` GpuSpec string `protobuf:"bytes,7,opt,name=gpu_spec,json=gpuSpec,proto3" json:"gpu_spec,omitempty"` DataDisk int32 `protobuf:"varint,8,opt,name=data_disk,json=dataDisk,proto3" json:"data_disk,omitempty"` Kernel string `protobuf:"bytes,9,opt,name=kernel,proto3" json:"kernel,omitempty"` Container string `protobuf:"bytes,10,opt,name=container,proto3" json:"container,omitempty"` Kubelet string `protobuf:"bytes,11,opt,name=kubelet,proto3" json:"kubelet,omitempty"` KubeProxy string `protobuf:"bytes,12,opt,name=kube_proxy,json=kubeProxy,proto3" json:"kube_proxy,omitempty"` InternalIp string `protobuf:"bytes,13,opt,name=internal_ip,json=internalIp,proto3" json:"internal_ip,omitempty"` // contains filtered or unexported fields }
func (*System) Descriptor
deprecated
func (*System) GetContainer ¶
func (*System) GetDataDisk ¶
func (*System) GetGpuSpec ¶
func (*System) GetInternalIp ¶
func (*System) GetKubeProxy ¶
func (*System) GetKubelet ¶
func (*System) ProtoMessage ¶
func (*System) ProtoMessage()
func (*System) ProtoReflect ¶
func (x *System) ProtoReflect() protoreflect.Message
type SystemInterfaceClient ¶
type SystemInterfaceClient interface { Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.Msg, error) GetSystem(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*System, error) GetLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[LogRequest, LogResponse], error) }
SystemInterfaceClient is the client API for SystemInterface 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 NewSystemInterfaceClient ¶
func NewSystemInterfaceClient(cc grpc.ClientConnInterface) SystemInterfaceClient
type SystemInterfaceHTTPClient ¶
type SystemInterfaceHTTPClient interface { GetSystem(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *System, err error) Ping(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *common.Msg, err error) }
func NewSystemInterfaceHTTPClient ¶
func NewSystemInterfaceHTTPClient(client *http.Client) SystemInterfaceHTTPClient
type SystemInterfaceHTTPClientImpl ¶
type SystemInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
type SystemInterfaceServer ¶
type SystemInterfaceServer interface { Ping(context.Context, *emptypb.Empty) (*common.Msg, error) GetSystem(context.Context, *emptypb.Empty) (*System, error) GetLogs(grpc.BidiStreamingServer[LogRequest, LogResponse]) error // contains filtered or unexported methods }
SystemInterfaceServer is the server API for SystemInterface service. All implementations must embed UnimplementedSystemInterfaceServer for forward compatibility.
type SystemInterface_GetLogsClient ¶
type SystemInterface_GetLogsClient = grpc.BidiStreamingClient[LogRequest, LogResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type SystemInterface_GetLogsServer ¶
type SystemInterface_GetLogsServer = grpc.BidiStreamingServer[LogRequest, LogResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedSystemInterfaceServer ¶
type UnimplementedSystemInterfaceServer struct{}
UnimplementedSystemInterfaceServer 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.
func (UnimplementedSystemInterfaceServer) GetLogs ¶
func (UnimplementedSystemInterfaceServer) GetLogs(grpc.BidiStreamingServer[LogRequest, LogResponse]) error
type UnsafeSystemInterfaceServer ¶
type UnsafeSystemInterfaceServer interface {
// contains filtered or unexported methods
}
UnsafeSystemInterfaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SystemInterfaceServer will result in compilation errors.