Documentation ¶
Index ¶
- Variables
- func RegisterKingServiceServer(s grpc.ServiceRegistrar, srv KingServiceServer)
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetMinRamMb() int32
- func (x *Job) GetNumWork() int32
- func (x *Job) GetOnePerMachine() bool
- func (x *Job) GetProjectName() string
- func (x *Job) GetWasm() []byte
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type KingServiceClient
- type KingServiceServer
- type KingService_SubmitJobClient
- type KingService_SubmitJobServer
- type KingService_VolunteerClient
- type KingService_VolunteerServer
- type SubmitJobRequest
- func (*SubmitJobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitJobRequest) GetAddWork() *WorkRequest
- func (x *SubmitJobRequest) GetJob() *Job
- func (m *SubmitJobRequest) GetReq() isSubmitJobRequest_Req
- func (*SubmitJobRequest) ProtoMessage()
- func (x *SubmitJobRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitJobRequest) Reset()
- func (x *SubmitJobRequest) String() string
- type SubmitJobRequest_AddWork
- type SubmitJobRequest_Job
- type SubmitJobResponse
- func (*SubmitJobResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitJobResponse) GetCompletedWork() *WorkResponse
- func (m *SubmitJobResponse) GetResp() isSubmitJobResponse_Resp
- func (*SubmitJobResponse) ProtoMessage()
- func (x *SubmitJobResponse) ProtoReflect() protoreflect.Message
- func (x *SubmitJobResponse) Reset()
- func (x *SubmitJobResponse) String() string
- type SubmitJobResponse_CompletedWork
- type UnimplementedKingServiceServer
- type UnsafeKingServiceServer
- type VolunteerRequest
- func (*VolunteerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VolunteerRequest) GetFinishWork() *WorkResponse
- func (x *VolunteerRequest) GetHello() *VolunteerRequest_Hello
- func (x *VolunteerRequest) GetJobError() string
- func (m *VolunteerRequest) GetReq() isVolunteerRequest_Req
- func (*VolunteerRequest) ProtoMessage()
- func (x *VolunteerRequest) ProtoReflect() protoreflect.Message
- func (x *VolunteerRequest) Reset()
- func (x *VolunteerRequest) String() string
- type VolunteerRequest_FinishWork
- type VolunteerRequest_Hello
- func (*VolunteerRequest_Hello) Descriptor() ([]byte, []int)deprecated
- func (x *VolunteerRequest_Hello) GetCpus() int32
- func (x *VolunteerRequest_Hello) GetHostname() string
- func (x *VolunteerRequest_Hello) GetRamMbAllocatable() int32
- func (*VolunteerRequest_Hello) ProtoMessage()
- func (x *VolunteerRequest_Hello) ProtoReflect() protoreflect.Message
- func (x *VolunteerRequest_Hello) Reset()
- func (x *VolunteerRequest_Hello) String() string
- type VolunteerRequest_Hello_
- type VolunteerRequest_JobError
- type VolunteerResponse
- func (*VolunteerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VolunteerResponse) GetEndJob() *VolunteerResponse_EndJob
- func (m *VolunteerResponse) GetResp() isVolunteerResponse_Resp
- func (x *VolunteerResponse) GetStartJob() *Job
- func (x *VolunteerResponse) GetStartWork() *WorkRequest
- func (*VolunteerResponse) ProtoMessage()
- func (x *VolunteerResponse) ProtoReflect() protoreflect.Message
- func (x *VolunteerResponse) Reset()
- func (x *VolunteerResponse) String() string
- type VolunteerResponse_EndJob
- type VolunteerResponse_EndJob_
- type VolunteerResponse_StartJob
- type VolunteerResponse_StartWork
- type WorkRequest
- type WorkResponse
- func (*WorkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WorkResponse) GetErrorMessage() string
- func (x *WorkResponse) GetId() int32
- func (x *WorkResponse) GetResult() []byte
- func (*WorkResponse) ProtoMessage()
- func (x *WorkResponse) ProtoReflect() protoreflect.Message
- func (x *WorkResponse) Reset()
- func (x *WorkResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_api_proto protoreflect.FileDescriptor
var KingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "com.github.Jille.distwasm.KingService", HandlerType: (*KingServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Volunteer", Handler: _KingService_Volunteer_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "SubmitJob", Handler: _KingService_SubmitJob_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api.proto", }
KingService_ServiceDesc is the grpc.ServiceDesc for KingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKingServiceServer ¶
func RegisterKingServiceServer(s grpc.ServiceRegistrar, srv KingServiceServer)
Types ¶
type Job ¶
type Job struct { ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` Wasm []byte `protobuf:"bytes,2,opt,name=wasm,proto3" json:"wasm,omitempty"` NumWork int32 `protobuf:"varint,3,opt,name=num_work,json=numWork,proto3" json:"num_work,omitempty"` MinRamMb int32 `protobuf:"varint,4,opt,name=min_ram_mb,json=minRamMb,proto3" json:"min_ram_mb,omitempty"` OnePerMachine bool `protobuf:"varint,5,opt,name=one_per_machine,json=onePerMachine,proto3" json:"one_per_machine,omitempty"` // contains filtered or unexported fields }
func (*Job) Descriptor
deprecated
func (*Job) GetMinRamMb ¶
func (*Job) GetNumWork ¶
func (*Job) GetOnePerMachine ¶
func (*Job) GetProjectName ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type KingServiceClient ¶
type KingServiceClient interface { Volunteer(ctx context.Context, opts ...grpc.CallOption) (KingService_VolunteerClient, error) SubmitJob(ctx context.Context, opts ...grpc.CallOption) (KingService_SubmitJobClient, error) }
KingServiceClient is the client API for KingService 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 NewKingServiceClient ¶
func NewKingServiceClient(cc grpc.ClientConnInterface) KingServiceClient
type KingServiceServer ¶
type KingServiceServer interface { Volunteer(KingService_VolunteerServer) error SubmitJob(KingService_SubmitJobServer) error }
KingServiceServer is the server API for KingService service. All implementations should embed UnimplementedKingServiceServer for forward compatibility
type KingService_SubmitJobClient ¶
type KingService_SubmitJobClient interface { Send(*SubmitJobRequest) error Recv() (*SubmitJobResponse, error) grpc.ClientStream }
type KingService_SubmitJobServer ¶
type KingService_SubmitJobServer interface { Send(*SubmitJobResponse) error Recv() (*SubmitJobRequest, error) grpc.ServerStream }
type KingService_VolunteerClient ¶
type KingService_VolunteerClient interface { Send(*VolunteerRequest) error Recv() (*VolunteerResponse, error) grpc.ClientStream }
type KingService_VolunteerServer ¶
type KingService_VolunteerServer interface { Send(*VolunteerResponse) error Recv() (*VolunteerRequest, error) grpc.ServerStream }
type SubmitJobRequest ¶
type SubmitJobRequest struct { // Types that are assignable to Req: // *SubmitJobRequest_Job // *SubmitJobRequest_AddWork Req isSubmitJobRequest_Req `protobuf_oneof:"req"` // contains filtered or unexported fields }
func (*SubmitJobRequest) Descriptor
deprecated
func (*SubmitJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitJobRequest.ProtoReflect.Descriptor instead.
func (*SubmitJobRequest) GetAddWork ¶
func (x *SubmitJobRequest) GetAddWork() *WorkRequest
func (*SubmitJobRequest) GetJob ¶
func (x *SubmitJobRequest) GetJob() *Job
func (*SubmitJobRequest) GetReq ¶
func (m *SubmitJobRequest) GetReq() isSubmitJobRequest_Req
func (*SubmitJobRequest) ProtoMessage ¶
func (*SubmitJobRequest) ProtoMessage()
func (*SubmitJobRequest) ProtoReflect ¶
func (x *SubmitJobRequest) ProtoReflect() protoreflect.Message
func (*SubmitJobRequest) Reset ¶
func (x *SubmitJobRequest) Reset()
func (*SubmitJobRequest) String ¶
func (x *SubmitJobRequest) String() string
type SubmitJobRequest_AddWork ¶
type SubmitJobRequest_AddWork struct {
AddWork *WorkRequest `protobuf:"bytes,2,opt,name=add_work,json=addWork,proto3,oneof"`
}
type SubmitJobRequest_Job ¶
type SubmitJobRequest_Job struct {
Job *Job `protobuf:"bytes,1,opt,name=job,proto3,oneof"`
}
type SubmitJobResponse ¶
type SubmitJobResponse struct { // Types that are assignable to Resp: // *SubmitJobResponse_CompletedWork Resp isSubmitJobResponse_Resp `protobuf_oneof:"resp"` // contains filtered or unexported fields }
func (*SubmitJobResponse) Descriptor
deprecated
func (*SubmitJobResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitJobResponse.ProtoReflect.Descriptor instead.
func (*SubmitJobResponse) GetCompletedWork ¶
func (x *SubmitJobResponse) GetCompletedWork() *WorkResponse
func (*SubmitJobResponse) GetResp ¶
func (m *SubmitJobResponse) GetResp() isSubmitJobResponse_Resp
func (*SubmitJobResponse) ProtoMessage ¶
func (*SubmitJobResponse) ProtoMessage()
func (*SubmitJobResponse) ProtoReflect ¶
func (x *SubmitJobResponse) ProtoReflect() protoreflect.Message
func (*SubmitJobResponse) Reset ¶
func (x *SubmitJobResponse) Reset()
func (*SubmitJobResponse) String ¶
func (x *SubmitJobResponse) String() string
type SubmitJobResponse_CompletedWork ¶
type SubmitJobResponse_CompletedWork struct {
CompletedWork *WorkResponse `protobuf:"bytes,2,opt,name=completed_work,json=completedWork,proto3,oneof"`
}
type UnimplementedKingServiceServer ¶
type UnimplementedKingServiceServer struct { }
UnimplementedKingServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedKingServiceServer) SubmitJob ¶
func (UnimplementedKingServiceServer) SubmitJob(KingService_SubmitJobServer) error
func (UnimplementedKingServiceServer) Volunteer ¶
func (UnimplementedKingServiceServer) Volunteer(KingService_VolunteerServer) error
type UnsafeKingServiceServer ¶
type UnsafeKingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeKingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KingServiceServer will result in compilation errors.
type VolunteerRequest ¶
type VolunteerRequest struct { // Types that are assignable to Req: // *VolunteerRequest_Hello_ // *VolunteerRequest_FinishWork // *VolunteerRequest_JobError Req isVolunteerRequest_Req `protobuf_oneof:"req"` // contains filtered or unexported fields }
func (*VolunteerRequest) Descriptor
deprecated
func (*VolunteerRequest) Descriptor() ([]byte, []int)
Deprecated: Use VolunteerRequest.ProtoReflect.Descriptor instead.
func (*VolunteerRequest) GetFinishWork ¶
func (x *VolunteerRequest) GetFinishWork() *WorkResponse
func (*VolunteerRequest) GetHello ¶
func (x *VolunteerRequest) GetHello() *VolunteerRequest_Hello
func (*VolunteerRequest) GetJobError ¶
func (x *VolunteerRequest) GetJobError() string
func (*VolunteerRequest) GetReq ¶
func (m *VolunteerRequest) GetReq() isVolunteerRequest_Req
func (*VolunteerRequest) ProtoMessage ¶
func (*VolunteerRequest) ProtoMessage()
func (*VolunteerRequest) ProtoReflect ¶
func (x *VolunteerRequest) ProtoReflect() protoreflect.Message
func (*VolunteerRequest) Reset ¶
func (x *VolunteerRequest) Reset()
func (*VolunteerRequest) String ¶
func (x *VolunteerRequest) String() string
type VolunteerRequest_FinishWork ¶
type VolunteerRequest_FinishWork struct {
FinishWork *WorkResponse `protobuf:"bytes,2,opt,name=finish_work,json=finishWork,proto3,oneof"`
}
type VolunteerRequest_Hello ¶
type VolunteerRequest_Hello struct { Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"` RamMbAllocatable int32 `protobuf:"varint,3,opt,name=ram_mb_allocatable,json=ramMbAllocatable,proto3" json:"ram_mb_allocatable,omitempty"` // contains filtered or unexported fields }
func (*VolunteerRequest_Hello) Descriptor
deprecated
func (*VolunteerRequest_Hello) Descriptor() ([]byte, []int)
Deprecated: Use VolunteerRequest_Hello.ProtoReflect.Descriptor instead.
func (*VolunteerRequest_Hello) GetCpus ¶
func (x *VolunteerRequest_Hello) GetCpus() int32
func (*VolunteerRequest_Hello) GetHostname ¶
func (x *VolunteerRequest_Hello) GetHostname() string
func (*VolunteerRequest_Hello) GetRamMbAllocatable ¶
func (x *VolunteerRequest_Hello) GetRamMbAllocatable() int32
func (*VolunteerRequest_Hello) ProtoMessage ¶
func (*VolunteerRequest_Hello) ProtoMessage()
func (*VolunteerRequest_Hello) ProtoReflect ¶
func (x *VolunteerRequest_Hello) ProtoReflect() protoreflect.Message
func (*VolunteerRequest_Hello) Reset ¶
func (x *VolunteerRequest_Hello) Reset()
func (*VolunteerRequest_Hello) String ¶
func (x *VolunteerRequest_Hello) String() string
type VolunteerRequest_Hello_ ¶
type VolunteerRequest_Hello_ struct {
Hello *VolunteerRequest_Hello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}
type VolunteerRequest_JobError ¶
type VolunteerRequest_JobError struct {
JobError string `protobuf:"bytes,3,opt,name=job_error,json=jobError,proto3,oneof"`
}
type VolunteerResponse ¶
type VolunteerResponse struct { // Types that are assignable to Resp: // *VolunteerResponse_StartJob // *VolunteerResponse_StartWork // *VolunteerResponse_EndJob_ Resp isVolunteerResponse_Resp `protobuf_oneof:"resp"` // contains filtered or unexported fields }
func (*VolunteerResponse) Descriptor
deprecated
func (*VolunteerResponse) Descriptor() ([]byte, []int)
Deprecated: Use VolunteerResponse.ProtoReflect.Descriptor instead.
func (*VolunteerResponse) GetEndJob ¶
func (x *VolunteerResponse) GetEndJob() *VolunteerResponse_EndJob
func (*VolunteerResponse) GetResp ¶
func (m *VolunteerResponse) GetResp() isVolunteerResponse_Resp
func (*VolunteerResponse) GetStartJob ¶
func (x *VolunteerResponse) GetStartJob() *Job
func (*VolunteerResponse) GetStartWork ¶
func (x *VolunteerResponse) GetStartWork() *WorkRequest
func (*VolunteerResponse) ProtoMessage ¶
func (*VolunteerResponse) ProtoMessage()
func (*VolunteerResponse) ProtoReflect ¶
func (x *VolunteerResponse) ProtoReflect() protoreflect.Message
func (*VolunteerResponse) Reset ¶
func (x *VolunteerResponse) Reset()
func (*VolunteerResponse) String ¶
func (x *VolunteerResponse) String() string
type VolunteerResponse_EndJob ¶
type VolunteerResponse_EndJob struct {
// contains filtered or unexported fields
}
func (*VolunteerResponse_EndJob) Descriptor
deprecated
func (*VolunteerResponse_EndJob) Descriptor() ([]byte, []int)
Deprecated: Use VolunteerResponse_EndJob.ProtoReflect.Descriptor instead.
func (*VolunteerResponse_EndJob) ProtoMessage ¶
func (*VolunteerResponse_EndJob) ProtoMessage()
func (*VolunteerResponse_EndJob) ProtoReflect ¶
func (x *VolunteerResponse_EndJob) ProtoReflect() protoreflect.Message
func (*VolunteerResponse_EndJob) Reset ¶
func (x *VolunteerResponse_EndJob) Reset()
func (*VolunteerResponse_EndJob) String ¶
func (x *VolunteerResponse_EndJob) String() string
type VolunteerResponse_EndJob_ ¶
type VolunteerResponse_EndJob_ struct {
EndJob *VolunteerResponse_EndJob `protobuf:"bytes,3,opt,name=end_job,json=endJob,proto3,oneof"`
}
type VolunteerResponse_StartJob ¶
type VolunteerResponse_StartJob struct {
StartJob *Job `protobuf:"bytes,1,opt,name=start_job,json=startJob,proto3,oneof"`
}
type VolunteerResponse_StartWork ¶
type VolunteerResponse_StartWork struct {
StartWork *WorkRequest `protobuf:"bytes,2,opt,name=start_work,json=startWork,proto3,oneof"`
}
type WorkRequest ¶
type WorkRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*WorkRequest) Descriptor
deprecated
func (*WorkRequest) Descriptor() ([]byte, []int)
Deprecated: Use WorkRequest.ProtoReflect.Descriptor instead.
func (*WorkRequest) GetData ¶
func (x *WorkRequest) GetData() []byte
func (*WorkRequest) GetId ¶
func (x *WorkRequest) GetId() int32
func (*WorkRequest) ProtoMessage ¶
func (*WorkRequest) ProtoMessage()
func (*WorkRequest) ProtoReflect ¶
func (x *WorkRequest) ProtoReflect() protoreflect.Message
func (*WorkRequest) Reset ¶
func (x *WorkRequest) Reset()
func (*WorkRequest) String ¶
func (x *WorkRequest) String() string
type WorkResponse ¶
type WorkResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` Result []byte `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*WorkResponse) Descriptor
deprecated
func (*WorkResponse) Descriptor() ([]byte, []int)
Deprecated: Use WorkResponse.ProtoReflect.Descriptor instead.
func (*WorkResponse) GetErrorMessage ¶
func (x *WorkResponse) GetErrorMessage() string
func (*WorkResponse) GetId ¶
func (x *WorkResponse) GetId() int32
func (*WorkResponse) GetResult ¶
func (x *WorkResponse) GetResult() []byte
func (*WorkResponse) ProtoMessage ¶
func (*WorkResponse) ProtoMessage()
func (*WorkResponse) ProtoReflect ¶
func (x *WorkResponse) ProtoReflect() protoreflect.Message
func (*WorkResponse) Reset ¶
func (x *WorkResponse) Reset()
func (*WorkResponse) String ¶
func (x *WorkResponse) String() string