// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package scalebox import ( context "context" empty "github.com/golang/protobuf/ptypes/empty" wrappers "github.com/golang/protobuf/ptypes/wrappers" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // 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 // BoxServiceClient is the client API for BoxService 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 BoxServiceClient interface { // input : slot id('ON') // return : job-key of the task, id==0(NULL) // task id : 'READY/-1' -> 'QUEUED/-2' GetNextTask(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*TaskItem, error) // input : task id('QUEUED/-2') // return : ret_code : 0(OK), -1(task NOT FOUND), -2(WRONG STATUS) // task_status_code:'QUEUED'/-2 -> 'RUNNING'/-3 SetTaskStarted(ctx context.Context, in *wrappers.Int64Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // input : TaskExecMessage // return : ret_code : 0(OK), -1(task NOT FOUND), -2(task WRONG STATUS) // task_status_code:'RUNNING'/-3 -> 'OK'/0, ... SetTaskFinished(ctx context.Context, in *TaskExecMessage, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // slot exit automatically, called in agent side // input : slot id // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot : 'ON' -> 'OFF' SetSlotTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // input: token_string ? // job:'RUNNING' && slot:'READY' GetRunnableSlotList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) // input : slot id // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot: 'READY' -> 'ON' SetSlotInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // job:'RUNNING' && worker:'PAUSED' GetRunnableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) // input : worker id // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) // worker: 'PAUSED' -> 'RUNNING' SetWorkerInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // job:'PAUSED' && worker:'RUNNING' GetTerminableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) // input : worker id, return ret_code; // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) // worker : 'RUNNING' -> 'PAUSED' SetWorkerTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // send task-key to next job in current pipeline // return : ret_code : 0(OK), -1(job NOT FOUND) // task_status_code : 'INITIAL'/-9 SendToNextJob(ctx context.Context, in *JobKey, opts ...grpc.CallOption) (*wrappers.Int32Value, error) SendMessagesToNext(ctx context.Context, in *JobKeys, opts ...grpc.CallOption) (*wrappers.Int32Value, error) } type boxServiceClient struct { cc grpc.ClientConnInterface } func NewBoxServiceClient(cc grpc.ClientConnInterface) BoxServiceClient { return &boxServiceClient{cc} } func (c *boxServiceClient) GetNextTask(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*TaskItem, error) { out := new(TaskItem) err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetNextTask", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetTaskStarted(ctx context.Context, in *wrappers.Int64Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetTaskStarted", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetTaskFinished(ctx context.Context, in *TaskExecMessage, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetTaskFinished", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetSlotTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetSlotTerminated", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) GetRunnableSlotList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { out := new(CommandList) err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetRunnableSlotList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetSlotInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetSlotInitialized", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) GetRunnableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { out := new(CommandList) err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetRunnableWorkerList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetWorkerInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetWorkerInitialized", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) GetTerminableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { out := new(CommandList) err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetTerminableWorkerList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SetWorkerTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetWorkerTerminated", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SendToNextJob(ctx context.Context, in *JobKey, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SendToNextJob", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *boxServiceClient) SendMessagesToNext(ctx context.Context, in *JobKeys, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) err := c.cc.Invoke(ctx, "/scalebox.BoxService/SendMessagesToNext", in, out, opts...) if err != nil { return nil, err } return out, nil } // BoxServiceServer is the server API for BoxService service. // All implementations must embed UnimplementedBoxServiceServer // for forward compatibility type BoxServiceServer interface { // input : slot id('ON') // return : job-key of the task, id==0(NULL) // task id : 'READY/-1' -> 'QUEUED/-2' GetNextTask(context.Context, *wrappers.Int32Value) (*TaskItem, error) // input : task id('QUEUED/-2') // return : ret_code : 0(OK), -1(task NOT FOUND), -2(WRONG STATUS) // task_status_code:'QUEUED'/-2 -> 'RUNNING'/-3 SetTaskStarted(context.Context, *wrappers.Int64Value) (*wrappers.Int32Value, error) // input : TaskExecMessage // return : ret_code : 0(OK), -1(task NOT FOUND), -2(task WRONG STATUS) // task_status_code:'RUNNING'/-3 -> 'OK'/0, ... SetTaskFinished(context.Context, *TaskExecMessage) (*wrappers.Int32Value, error) // slot exit automatically, called in agent side // input : slot id // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot : 'ON' -> 'OFF' SetSlotTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) // input: token_string ? // job:'RUNNING' && slot:'READY' GetRunnableSlotList(context.Context, *empty.Empty) (*CommandList, error) // input : slot id // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot: 'READY' -> 'ON' SetSlotInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) // job:'RUNNING' && worker:'PAUSED' GetRunnableWorkerList(context.Context, *empty.Empty) (*CommandList, error) // input : worker id // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) // worker: 'PAUSED' -> 'RUNNING' SetWorkerInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) // job:'PAUSED' && worker:'RUNNING' GetTerminableWorkerList(context.Context, *empty.Empty) (*CommandList, error) // input : worker id, return ret_code; // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) // worker : 'RUNNING' -> 'PAUSED' SetWorkerTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) // send task-key to next job in current pipeline // return : ret_code : 0(OK), -1(job NOT FOUND) // task_status_code : 'INITIAL'/-9 SendToNextJob(context.Context, *JobKey) (*wrappers.Int32Value, error) SendMessagesToNext(context.Context, *JobKeys) (*wrappers.Int32Value, error) mustEmbedUnimplementedBoxServiceServer() } // UnimplementedBoxServiceServer must be embedded to have forward compatible implementations. type UnimplementedBoxServiceServer struct { } func (UnimplementedBoxServiceServer) GetNextTask(context.Context, *wrappers.Int32Value) (*TaskItem, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNextTask not implemented") } func (UnimplementedBoxServiceServer) SetTaskStarted(context.Context, *wrappers.Int64Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetTaskStarted not implemented") } func (UnimplementedBoxServiceServer) SetTaskFinished(context.Context, *TaskExecMessage) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetTaskFinished not implemented") } func (UnimplementedBoxServiceServer) SetSlotTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetSlotTerminated not implemented") } func (UnimplementedBoxServiceServer) GetRunnableSlotList(context.Context, *empty.Empty) (*CommandList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRunnableSlotList not implemented") } func (UnimplementedBoxServiceServer) SetSlotInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetSlotInitialized not implemented") } func (UnimplementedBoxServiceServer) GetRunnableWorkerList(context.Context, *empty.Empty) (*CommandList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRunnableWorkerList not implemented") } func (UnimplementedBoxServiceServer) SetWorkerInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetWorkerInitialized not implemented") } func (UnimplementedBoxServiceServer) GetTerminableWorkerList(context.Context, *empty.Empty) (*CommandList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTerminableWorkerList not implemented") } func (UnimplementedBoxServiceServer) SetWorkerTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetWorkerTerminated not implemented") } func (UnimplementedBoxServiceServer) SendToNextJob(context.Context, *JobKey) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SendToNextJob not implemented") } func (UnimplementedBoxServiceServer) SendMessagesToNext(context.Context, *JobKeys) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMessagesToNext not implemented") } func (UnimplementedBoxServiceServer) mustEmbedUnimplementedBoxServiceServer() {} // UnsafeBoxServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BoxServiceServer will // result in compilation errors. type UnsafeBoxServiceServer interface { mustEmbedUnimplementedBoxServiceServer() } func RegisterBoxServiceServer(s grpc.ServiceRegistrar, srv BoxServiceServer) { s.RegisterService(&BoxService_ServiceDesc, srv) } func _BoxService_GetNextTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).GetNextTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/GetNextTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).GetNextTask(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetTaskStarted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int64Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetTaskStarted(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetTaskStarted", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetTaskStarted(ctx, req.(*wrappers.Int64Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetTaskFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TaskExecMessage) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetTaskFinished(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetTaskFinished", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetTaskFinished(ctx, req.(*TaskExecMessage)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetSlotTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetSlotTerminated(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetSlotTerminated", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetSlotTerminated(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_GetRunnableSlotList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).GetRunnableSlotList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/GetRunnableSlotList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).GetRunnableSlotList(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetSlotInitialized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetSlotInitialized(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetSlotInitialized", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetSlotInitialized(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_GetRunnableWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).GetRunnableWorkerList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/GetRunnableWorkerList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).GetRunnableWorkerList(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetWorkerInitialized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetWorkerInitialized(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetWorkerInitialized", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetWorkerInitialized(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_GetTerminableWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).GetTerminableWorkerList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/GetTerminableWorkerList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).GetTerminableWorkerList(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _BoxService_SetWorkerTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SetWorkerTerminated(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SetWorkerTerminated", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SetWorkerTerminated(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } func _BoxService_SendToNextJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(JobKey) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SendToNextJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SendToNextJob", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SendToNextJob(ctx, req.(*JobKey)) } return interceptor(ctx, in, info, handler) } func _BoxService_SendMessagesToNext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(JobKeys) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BoxServiceServer).SendMessagesToNext(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/scalebox.BoxService/SendMessagesToNext", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BoxServiceServer).SendMessagesToNext(ctx, req.(*JobKeys)) } return interceptor(ctx, in, info, handler) } // BoxService_ServiceDesc is the grpc.ServiceDesc for BoxService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var BoxService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "scalebox.BoxService", HandlerType: (*BoxServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNextTask", Handler: _BoxService_GetNextTask_Handler, }, { MethodName: "SetTaskStarted", Handler: _BoxService_SetTaskStarted_Handler, }, { MethodName: "SetTaskFinished", Handler: _BoxService_SetTaskFinished_Handler, }, { MethodName: "SetSlotTerminated", Handler: _BoxService_SetSlotTerminated_Handler, }, { MethodName: "GetRunnableSlotList", Handler: _BoxService_GetRunnableSlotList_Handler, }, { MethodName: "SetSlotInitialized", Handler: _BoxService_SetSlotInitialized_Handler, }, { MethodName: "GetRunnableWorkerList", Handler: _BoxService_GetRunnableWorkerList_Handler, }, { MethodName: "SetWorkerInitialized", Handler: _BoxService_SetWorkerInitialized_Handler, }, { MethodName: "GetTerminableWorkerList", Handler: _BoxService_GetTerminableWorkerList_Handler, }, { MethodName: "SetWorkerTerminated", Handler: _BoxService_SetWorkerTerminated_Handler, }, { MethodName: "SendToNextJob", Handler: _BoxService_SendToNextJob_Handler, }, { MethodName: "SendMessagesToNext", Handler: _BoxService_SendMessagesToNext_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "agent.proto", }