Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterJobServer(s grpc.ServiceRegistrar, srv JobServer)
- func RegisterTaskServer(s grpc.ServiceRegistrar, srv TaskServer)
- type JobClient
- type JobInvokeServiceRequest
- func (*JobInvokeServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JobInvokeServiceRequest) GetApp() string
- func (x *JobInvokeServiceRequest) GetMethod() string
- func (x *JobInvokeServiceRequest) GetModule() string
- func (x *JobInvokeServiceRequest) GetRequest() []byte
- func (x *JobInvokeServiceRequest) GetVersion() int32
- func (*JobInvokeServiceRequest) ProtoMessage()
- func (x *JobInvokeServiceRequest) ProtoReflect() protoreflect.Message
- func (x *JobInvokeServiceRequest) Reset()
- func (x *JobInvokeServiceRequest) String() string
- type JobInvokeServiceResponse
- func (*JobInvokeServiceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *JobInvokeServiceResponse) GetResponse() []byte
- func (*JobInvokeServiceResponse) ProtoMessage()
- func (x *JobInvokeServiceResponse) ProtoReflect() protoreflect.Message
- func (x *JobInvokeServiceResponse) Reset()
- func (x *JobInvokeServiceResponse) String() string
- type JobServer
- type JobUpdateProgressRequest
- func (*JobUpdateProgressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JobUpdateProgressRequest) GetProgress() int32
- func (x *JobUpdateProgressRequest) GetTaskId() int64
- func (*JobUpdateProgressRequest) ProtoMessage()
- func (x *JobUpdateProgressRequest) ProtoReflect() protoreflect.Message
- func (x *JobUpdateProgressRequest) Reset()
- func (x *JobUpdateProgressRequest) String() string
- type JobUpdateProgressResponse
- type TaskClient
- type TaskExecuteRequest
- func (*TaskExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TaskExecuteRequest) GetParams() map[string]string
- func (*TaskExecuteRequest) ProtoMessage()
- func (x *TaskExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *TaskExecuteRequest) Reset()
- func (x *TaskExecuteRequest) String() string
- type TaskExecuteResponse
- func (*TaskExecuteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TaskExecuteResponse) GetError() string
- func (x *TaskExecuteResponse) GetResult() string
- func (*TaskExecuteResponse) ProtoMessage()
- func (x *TaskExecuteResponse) ProtoReflect() protoreflect.Message
- func (x *TaskExecuteResponse) Reset()
- func (x *TaskExecuteResponse) String() string
- type TaskServer
- type UnimplementedJobServer
- type UnimplementedTaskServer
- type UnsafeJobServer
- type UnsafeTaskServer
Constants ¶
const ( Job_InvokeService_FullMethodName = "/protobuf.Job/InvokeService" Job_UpdateProgress_FullMethodName = "/protobuf.Job/UpdateProgress" )
const (
Task_Execute_FullMethodName = "/protobuf.Task/Execute"
)
Variables ¶
var File_proto_job_proto protoreflect.FileDescriptor
var File_proto_task_proto protoreflect.FileDescriptor
var Job_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protobuf.Job", HandlerType: (*JobServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InvokeService", Handler: _Job_InvokeService_Handler, }, { MethodName: "UpdateProgress", Handler: _Job_UpdateProgress_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/job.proto", }
Job_ServiceDesc is the grpc.ServiceDesc for Job service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Task_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protobuf.Task", HandlerType: (*TaskServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Execute", Handler: _Task_Execute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/task.proto", }
Task_ServiceDesc is the grpc.ServiceDesc for Task service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterJobServer ¶
func RegisterJobServer(s grpc.ServiceRegistrar, srv JobServer)
func RegisterTaskServer ¶
func RegisterTaskServer(s grpc.ServiceRegistrar, srv TaskServer)
Types ¶
type JobClient ¶
type JobClient interface {
InvokeService(ctx context.Context, in *JobInvokeServiceRequest, opts ...grpc.CallOption) (*JobInvokeServiceResponse, error)
UpdateProgress(ctx context.Context, in *JobUpdateProgressRequest, opts ...grpc.CallOption) (*JobUpdateProgressResponse, error)
}
JobClient is the client API for Job 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 NewJobClient ¶
func NewJobClient(cc grpc.ClientConnInterface) JobClient
type JobInvokeServiceRequest ¶
type JobInvokeServiceRequest struct {
App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
Module string `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"`
Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
Request []byte `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"`
// contains filtered or unexported fields
}
func (*JobInvokeServiceRequest) Descriptor
deprecated
func (*JobInvokeServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use JobInvokeServiceRequest.ProtoReflect.Descriptor instead.
func (*JobInvokeServiceRequest) GetApp ¶
func (x *JobInvokeServiceRequest) GetApp() string
func (*JobInvokeServiceRequest) GetMethod ¶
func (x *JobInvokeServiceRequest) GetMethod() string
func (*JobInvokeServiceRequest) GetModule ¶
func (x *JobInvokeServiceRequest) GetModule() string
func (*JobInvokeServiceRequest) GetRequest ¶
func (x *JobInvokeServiceRequest) GetRequest() []byte
func (*JobInvokeServiceRequest) GetVersion ¶
func (x *JobInvokeServiceRequest) GetVersion() int32
func (*JobInvokeServiceRequest) ProtoMessage ¶
func (*JobInvokeServiceRequest) ProtoMessage()
func (*JobInvokeServiceRequest) ProtoReflect ¶
func (x *JobInvokeServiceRequest) ProtoReflect() protoreflect.Message
func (*JobInvokeServiceRequest) Reset ¶
func (x *JobInvokeServiceRequest) Reset()
func (*JobInvokeServiceRequest) String ¶
func (x *JobInvokeServiceRequest) String() string
type JobInvokeServiceResponse ¶
type JobInvokeServiceResponse struct {
Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
// contains filtered or unexported fields
}
func (*JobInvokeServiceResponse) Descriptor
deprecated
func (*JobInvokeServiceResponse) Descriptor() ([]byte, []int)
Deprecated: Use JobInvokeServiceResponse.ProtoReflect.Descriptor instead.
func (*JobInvokeServiceResponse) GetResponse ¶
func (x *JobInvokeServiceResponse) GetResponse() []byte
func (*JobInvokeServiceResponse) ProtoMessage ¶
func (*JobInvokeServiceResponse) ProtoMessage()
func (*JobInvokeServiceResponse) ProtoReflect ¶
func (x *JobInvokeServiceResponse) ProtoReflect() protoreflect.Message
func (*JobInvokeServiceResponse) Reset ¶
func (x *JobInvokeServiceResponse) Reset()
func (*JobInvokeServiceResponse) String ¶
func (x *JobInvokeServiceResponse) String() string
type JobServer ¶
type JobServer interface {
InvokeService(context.Context, *JobInvokeServiceRequest) (*JobInvokeServiceResponse, error)
UpdateProgress(context.Context, *JobUpdateProgressRequest) (*JobUpdateProgressResponse, error)
// contains filtered or unexported methods
}
JobServer is the server API for Job service. All implementations must embed UnimplementedJobServer for forward compatibility.
type JobUpdateProgressRequest ¶
type JobUpdateProgressRequest struct {
TaskId int64 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId,omitempty"`
Progress int32 `protobuf:"varint,2,opt,name=progress,proto3" json:"progress,omitempty"`
// contains filtered or unexported fields
}
func (*JobUpdateProgressRequest) Descriptor
deprecated
func (*JobUpdateProgressRequest) Descriptor() ([]byte, []int)
Deprecated: Use JobUpdateProgressRequest.ProtoReflect.Descriptor instead.
func (*JobUpdateProgressRequest) GetProgress ¶
func (x *JobUpdateProgressRequest) GetProgress() int32
func (*JobUpdateProgressRequest) GetTaskId ¶
func (x *JobUpdateProgressRequest) GetTaskId() int64
func (*JobUpdateProgressRequest) ProtoMessage ¶
func (*JobUpdateProgressRequest) ProtoMessage()
func (*JobUpdateProgressRequest) ProtoReflect ¶
func (x *JobUpdateProgressRequest) ProtoReflect() protoreflect.Message
func (*JobUpdateProgressRequest) Reset ¶
func (x *JobUpdateProgressRequest) Reset()
func (*JobUpdateProgressRequest) String ¶
func (x *JobUpdateProgressRequest) String() string
type JobUpdateProgressResponse ¶
type JobUpdateProgressResponse struct {
// contains filtered or unexported fields
}
func (*JobUpdateProgressResponse) Descriptor
deprecated
func (*JobUpdateProgressResponse) Descriptor() ([]byte, []int)
Deprecated: Use JobUpdateProgressResponse.ProtoReflect.Descriptor instead.
func (*JobUpdateProgressResponse) ProtoMessage ¶
func (*JobUpdateProgressResponse) ProtoMessage()
func (*JobUpdateProgressResponse) ProtoReflect ¶
func (x *JobUpdateProgressResponse) ProtoReflect() protoreflect.Message
func (*JobUpdateProgressResponse) Reset ¶
func (x *JobUpdateProgressResponse) Reset()
func (*JobUpdateProgressResponse) String ¶
func (x *JobUpdateProgressResponse) String() string
type TaskClient ¶
type TaskClient interface {
Execute(ctx context.Context, in *TaskExecuteRequest, opts ...grpc.CallOption) (*TaskExecuteResponse, error)
}
TaskClient is the client API for Task 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 NewTaskClient ¶
func NewTaskClient(cc grpc.ClientConnInterface) TaskClient
type TaskExecuteRequest ¶
type TaskExecuteRequest struct {
Params map[string]string `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
执行请求
func (*TaskExecuteRequest) Descriptor
deprecated
func (*TaskExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use TaskExecuteRequest.ProtoReflect.Descriptor instead.
func (*TaskExecuteRequest) GetParams ¶
func (x *TaskExecuteRequest) GetParams() map[string]string
func (*TaskExecuteRequest) ProtoMessage ¶
func (*TaskExecuteRequest) ProtoMessage()
func (*TaskExecuteRequest) ProtoReflect ¶
func (x *TaskExecuteRequest) ProtoReflect() protoreflect.Message
func (*TaskExecuteRequest) Reset ¶
func (x *TaskExecuteRequest) Reset()
func (*TaskExecuteRequest) String ¶
func (x *TaskExecuteRequest) String() string
type TaskExecuteResponse ¶
type TaskExecuteResponse struct {
Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // 错误信息
// contains filtered or unexported fields
}
执行响应
func (*TaskExecuteResponse) Descriptor
deprecated
func (*TaskExecuteResponse) Descriptor() ([]byte, []int)
Deprecated: Use TaskExecuteResponse.ProtoReflect.Descriptor instead.
func (*TaskExecuteResponse) GetError ¶
func (x *TaskExecuteResponse) GetError() string
func (*TaskExecuteResponse) GetResult ¶
func (x *TaskExecuteResponse) GetResult() string
func (*TaskExecuteResponse) ProtoMessage ¶
func (*TaskExecuteResponse) ProtoMessage()
func (*TaskExecuteResponse) ProtoReflect ¶
func (x *TaskExecuteResponse) ProtoReflect() protoreflect.Message
func (*TaskExecuteResponse) Reset ¶
func (x *TaskExecuteResponse) Reset()
func (*TaskExecuteResponse) String ¶
func (x *TaskExecuteResponse) String() string
type TaskServer ¶
type TaskServer interface {
Execute(context.Context, *TaskExecuteRequest) (*TaskExecuteResponse, error)
// contains filtered or unexported methods
}
TaskServer is the server API for Task service. All implementations must embed UnimplementedTaskServer for forward compatibility.
type UnimplementedJobServer ¶
type UnimplementedJobServer struct{}
UnimplementedJobServer 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 (UnimplementedJobServer) InvokeService ¶
func (UnimplementedJobServer) InvokeService(context.Context, *JobInvokeServiceRequest) (*JobInvokeServiceResponse, error)
func (UnimplementedJobServer) UpdateProgress ¶
func (UnimplementedJobServer) UpdateProgress(context.Context, *JobUpdateProgressRequest) (*JobUpdateProgressResponse, error)
type UnimplementedTaskServer ¶
type UnimplementedTaskServer struct{}
UnimplementedTaskServer 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 (UnimplementedTaskServer) Execute ¶
func (UnimplementedTaskServer) Execute(context.Context, *TaskExecuteRequest) (*TaskExecuteResponse, error)
type UnsafeJobServer ¶
type UnsafeJobServer interface {
// contains filtered or unexported methods
}
UnsafeJobServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JobServer will result in compilation errors.
type UnsafeTaskServer ¶
type UnsafeTaskServer interface {
// contains filtered or unexported methods
}
UnsafeTaskServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TaskServer will result in compilation errors.