mirror of
https://github.com/compute-blade-community/compute-blade-agent.git
synced 2026-04-21 17:45:43 +02:00
263 lines
11 KiB
Go
263 lines
11 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc (unknown)
|
|
// source: api/bladeapi/v1alpha1/blade.proto
|
|
|
|
package bladeapiv1alpha1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
const (
|
|
BladeAgentService_EmitEvent_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/EmitEvent"
|
|
BladeAgentService_WaitForIdentifyConfirm_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/WaitForIdentifyConfirm"
|
|
BladeAgentService_SetFanSpeed_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/SetFanSpeed"
|
|
BladeAgentService_SetStealthMode_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/SetStealthMode"
|
|
BladeAgentService_GetStatus_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/GetStatus"
|
|
)
|
|
|
|
// BladeAgentServiceClient is the client API for BladeAgentService 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 BladeAgentServiceClient interface {
|
|
// EmitEvent emits an event to the blade
|
|
EmitEvent(ctx context.Context, in *EmitEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// WaitForIdentifyConfirm blocks until the blades button is pressed
|
|
WaitForIdentifyConfirm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
SetFanSpeed(ctx context.Context, in *SetFanSpeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
SetStealthMode(ctx context.Context, in *StealthModeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusResponse, error)
|
|
}
|
|
|
|
type bladeAgentServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBladeAgentServiceClient(cc grpc.ClientConnInterface) BladeAgentServiceClient {
|
|
return &bladeAgentServiceClient{cc}
|
|
}
|
|
|
|
func (c *bladeAgentServiceClient) EmitEvent(ctx context.Context, in *EmitEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, BladeAgentService_EmitEvent_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bladeAgentServiceClient) WaitForIdentifyConfirm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, BladeAgentService_WaitForIdentifyConfirm_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bladeAgentServiceClient) SetFanSpeed(ctx context.Context, in *SetFanSpeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, BladeAgentService_SetFanSpeed_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bladeAgentServiceClient) SetStealthMode(ctx context.Context, in *StealthModeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, BladeAgentService_SetStealthMode_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bladeAgentServiceClient) GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusResponse, error) {
|
|
out := new(StatusResponse)
|
|
err := c.cc.Invoke(ctx, BladeAgentService_GetStatus_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BladeAgentServiceServer is the server API for BladeAgentService service.
|
|
// All implementations must embed UnimplementedBladeAgentServiceServer
|
|
// for forward compatibility
|
|
type BladeAgentServiceServer interface {
|
|
// EmitEvent emits an event to the blade
|
|
EmitEvent(context.Context, *EmitEventRequest) (*emptypb.Empty, error)
|
|
// WaitForIdentifyConfirm blocks until the blades button is pressed
|
|
WaitForIdentifyConfirm(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
|
SetFanSpeed(context.Context, *SetFanSpeedRequest) (*emptypb.Empty, error)
|
|
SetStealthMode(context.Context, *StealthModeRequest) (*emptypb.Empty, error)
|
|
GetStatus(context.Context, *emptypb.Empty) (*StatusResponse, error)
|
|
mustEmbedUnimplementedBladeAgentServiceServer()
|
|
}
|
|
|
|
// UnimplementedBladeAgentServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedBladeAgentServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedBladeAgentServiceServer) EmitEvent(context.Context, *EmitEventRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method EmitEvent not implemented")
|
|
}
|
|
func (UnimplementedBladeAgentServiceServer) WaitForIdentifyConfirm(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method WaitForIdentifyConfirm not implemented")
|
|
}
|
|
func (UnimplementedBladeAgentServiceServer) SetFanSpeed(context.Context, *SetFanSpeedRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetFanSpeed not implemented")
|
|
}
|
|
func (UnimplementedBladeAgentServiceServer) SetStealthMode(context.Context, *StealthModeRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetStealthMode not implemented")
|
|
}
|
|
func (UnimplementedBladeAgentServiceServer) GetStatus(context.Context, *emptypb.Empty) (*StatusResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
|
|
}
|
|
func (UnimplementedBladeAgentServiceServer) mustEmbedUnimplementedBladeAgentServiceServer() {}
|
|
|
|
// UnsafeBladeAgentServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BladeAgentServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeBladeAgentServiceServer interface {
|
|
mustEmbedUnimplementedBladeAgentServiceServer()
|
|
}
|
|
|
|
func RegisterBladeAgentServiceServer(s grpc.ServiceRegistrar, srv BladeAgentServiceServer) {
|
|
s.RegisterService(&BladeAgentService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _BladeAgentService_EmitEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EmitEventRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BladeAgentServiceServer).EmitEvent(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BladeAgentService_EmitEvent_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BladeAgentServiceServer).EmitEvent(ctx, req.(*EmitEventRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BladeAgentService_WaitForIdentifyConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BladeAgentServiceServer).WaitForIdentifyConfirm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BladeAgentService_WaitForIdentifyConfirm_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BladeAgentServiceServer).WaitForIdentifyConfirm(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BladeAgentService_SetFanSpeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetFanSpeedRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BladeAgentServiceServer).SetFanSpeed(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BladeAgentService_SetFanSpeed_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BladeAgentServiceServer).SetFanSpeed(ctx, req.(*SetFanSpeedRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BladeAgentService_SetStealthMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StealthModeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BladeAgentServiceServer).SetStealthMode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BladeAgentService_SetStealthMode_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BladeAgentServiceServer).SetStealthMode(ctx, req.(*StealthModeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BladeAgentService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BladeAgentServiceServer).GetStatus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BladeAgentService_GetStatus_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BladeAgentServiceServer).GetStatus(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// BladeAgentService_ServiceDesc is the grpc.ServiceDesc for BladeAgentService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var BladeAgentService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.bladeapi.v1alpha1.BladeAgentService",
|
|
HandlerType: (*BladeAgentServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "EmitEvent",
|
|
Handler: _BladeAgentService_EmitEvent_Handler,
|
|
},
|
|
{
|
|
MethodName: "WaitForIdentifyConfirm",
|
|
Handler: _BladeAgentService_WaitForIdentifyConfirm_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetFanSpeed",
|
|
Handler: _BladeAgentService_SetFanSpeed_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetStealthMode",
|
|
Handler: _BladeAgentService_SetStealthMode_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetStatus",
|
|
Handler: _BladeAgentService_GetStatus_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/bladeapi/v1alpha1/blade.proto",
|
|
}
|