Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterComputationRunnerServer(s grpc.ServiceRegistrar, srv ComputationRunnerServer)
- type ComputationRunnerClient
- type ComputationRunnerServer
- type Dataset
- type RunRequest
- func (*RunRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RunRequest) GetAlgoType() string
- func (x *RunRequest) GetAlgorithm() []byte
- func (x *RunRequest) GetArgs() []string
- func (x *RunRequest) GetComputationId() string
- func (x *RunRequest) GetDatasets() []*Dataset
- func (x *RunRequest) GetRequirements() []byte
- func (*RunRequest) ProtoMessage()
- func (x *RunRequest) ProtoReflect() protoreflect.Message
- func (x *RunRequest) Reset()
- func (x *RunRequest) String() string
- type RunResponse
- func (*RunResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RunResponse) GetComputationId() string
- func (x *RunResponse) GetError() string
- func (*RunResponse) ProtoMessage()
- func (x *RunResponse) ProtoReflect() protoreflect.Message
- func (x *RunResponse) Reset()
- func (x *RunResponse) String() string
- type StopRequest
- type UnimplementedComputationRunnerServer
- type UnsafeComputationRunnerServer
Constants ¶
const ( ComputationRunner_Run_FullMethodName = "/runner.ComputationRunner/Run" ComputationRunner_Stop_FullMethodName = "/runner.ComputationRunner/Stop" )
Variables ¶
var ComputationRunner_ServiceDesc = grpc.ServiceDesc{ ServiceName: "runner.ComputationRunner", HandlerType: (*ComputationRunnerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Run", Handler: _ComputationRunner_Run_Handler, }, { MethodName: "Stop", Handler: _ComputationRunner_Stop_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "agent/runner/runner.proto", }
ComputationRunner_ServiceDesc is the grpc.ServiceDesc for ComputationRunner service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_agent_runner_runner_proto protoreflect.FileDescriptor
Functions ¶
func RegisterComputationRunnerServer ¶
func RegisterComputationRunnerServer(s grpc.ServiceRegistrar, srv ComputationRunnerServer)
Types ¶
type ComputationRunnerClient ¶
type ComputationRunnerClient interface {
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
ComputationRunnerClient is the client API for ComputationRunner 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 NewComputationRunnerClient ¶
func NewComputationRunnerClient(cc grpc.ClientConnInterface) ComputationRunnerClient
type ComputationRunnerServer ¶
type ComputationRunnerServer interface {
Run(context.Context, *RunRequest) (*RunResponse, error)
Stop(context.Context, *StopRequest) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
ComputationRunnerServer is the server API for ComputationRunner service. All implementations must embed UnimplementedComputationRunnerServer for forward compatibility.
type Dataset ¶
type Dataset struct {
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
// contains filtered or unexported fields
}
func (*Dataset) Descriptor
deprecated
func (*Dataset) GetFilename ¶
func (*Dataset) ProtoMessage ¶
func (*Dataset) ProtoMessage()
func (*Dataset) ProtoReflect ¶
func (x *Dataset) ProtoReflect() protoreflect.Message
type RunRequest ¶
type RunRequest struct {
ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
AlgoType string `protobuf:"bytes,2,opt,name=algo_type,json=algoType,proto3" json:"algo_type,omitempty"` // "binary", "python", "wasm", "docker"
Algorithm []byte `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // The algorithm binary/script content
Requirements []byte `protobuf:"bytes,4,opt,name=requirements,proto3" json:"requirements,omitempty"` // Python requirements.txt content
Args []string `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"`
Datasets []*Dataset `protobuf:"bytes,6,rep,name=datasets,proto3" json:"datasets,omitempty"`
// contains filtered or unexported fields
}
func (*RunRequest) Descriptor
deprecated
func (*RunRequest) Descriptor() ([]byte, []int)
Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.
func (*RunRequest) GetAlgoType ¶
func (x *RunRequest) GetAlgoType() string
func (*RunRequest) GetAlgorithm ¶
func (x *RunRequest) GetAlgorithm() []byte
func (*RunRequest) GetArgs ¶
func (x *RunRequest) GetArgs() []string
func (*RunRequest) GetComputationId ¶
func (x *RunRequest) GetComputationId() string
func (*RunRequest) GetDatasets ¶
func (x *RunRequest) GetDatasets() []*Dataset
func (*RunRequest) GetRequirements ¶
func (x *RunRequest) GetRequirements() []byte
func (*RunRequest) ProtoMessage ¶
func (*RunRequest) ProtoMessage()
func (*RunRequest) ProtoReflect ¶
func (x *RunRequest) ProtoReflect() protoreflect.Message
func (*RunRequest) Reset ¶
func (x *RunRequest) Reset()
func (*RunRequest) String ¶
func (x *RunRequest) String() string
type RunResponse ¶
type RunResponse struct {
ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*RunResponse) Descriptor
deprecated
func (*RunResponse) Descriptor() ([]byte, []int)
Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.
func (*RunResponse) GetComputationId ¶
func (x *RunResponse) GetComputationId() string
func (*RunResponse) GetError ¶
func (x *RunResponse) GetError() string
func (*RunResponse) ProtoMessage ¶
func (*RunResponse) ProtoMessage()
func (*RunResponse) ProtoReflect ¶
func (x *RunResponse) ProtoReflect() protoreflect.Message
func (*RunResponse) Reset ¶
func (x *RunResponse) Reset()
func (*RunResponse) String ¶
func (x *RunResponse) String() string
type StopRequest ¶
type StopRequest struct {
ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
// contains filtered or unexported fields
}
func (*StopRequest) Descriptor
deprecated
func (*StopRequest) Descriptor() ([]byte, []int)
Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.
func (*StopRequest) GetComputationId ¶
func (x *StopRequest) GetComputationId() string
func (*StopRequest) ProtoMessage ¶
func (*StopRequest) ProtoMessage()
func (*StopRequest) ProtoReflect ¶
func (x *StopRequest) ProtoReflect() protoreflect.Message
func (*StopRequest) Reset ¶
func (x *StopRequest) Reset()
func (*StopRequest) String ¶
func (x *StopRequest) String() string
type UnimplementedComputationRunnerServer ¶
type UnimplementedComputationRunnerServer struct{}
UnimplementedComputationRunnerServer 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 (UnimplementedComputationRunnerServer) Run ¶
func (UnimplementedComputationRunnerServer) Run(context.Context, *RunRequest) (*RunResponse, error)
func (UnimplementedComputationRunnerServer) Stop ¶
func (UnimplementedComputationRunnerServer) Stop(context.Context, *StopRequest) (*emptypb.Empty, error)
type UnsafeComputationRunnerServer ¶
type UnsafeComputationRunnerServer interface {
// contains filtered or unexported methods
}
UnsafeComputationRunnerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ComputationRunnerServer will result in compilation errors.