baremetal

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BareMetal_Submit_FullMethodName       = "/baremetal.BareMetal/Submit"
	BareMetal_JobStatus_FullMethodName    = "/baremetal.BareMetal/JobStatus"
	BareMetal_CancelJobs_FullMethodName   = "/baremetal.BareMetal/CancelJobs"
	BareMetal_FetchResults_FullMethodName = "/baremetal.BareMetal/FetchResults"
	BareMetal_UpdateJobs_FullMethodName   = "/baremetal.BareMetal/UpdateJobs"
	BareMetal_RecoverJob_FullMethodName   = "/baremetal.BareMetal/RecoverJob"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "NoStatus",
		1: "Pending",
		2: "Running",
		3: "Completed",
		4: "Canceled",
		5: "Errored",
	}
	Status_value = map[string]int32{
		"NoStatus":  0,
		"Pending":   1,
		"Running":   2,
		"Completed": 3,
		"Canceled":  4,
		"Errored":   5,
	}
)

Enum value maps for Status.

View Source
var BareMetal_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "baremetal.BareMetal",
	HandlerType: (*BareMetalServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Submit",
			Handler:    _BareMetal_Submit_Handler,
		},
		{
			MethodName: "JobStatus",
			Handler:    _BareMetal_JobStatus_Handler,
		},
		{
			MethodName: "CancelJobs",
			Handler:    _BareMetal_CancelJobs_Handler,
		},
		{
			MethodName: "FetchResults",
			Handler:    _BareMetal_FetchResults_Handler,
		},
		{
			MethodName: "UpdateJobs",
			Handler:    _BareMetal_UpdateJobs_Handler,
		},
		{
			MethodName: "RecoverJob",
			Handler:    _BareMetal_RecoverJob_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "baremetal/baremetal.proto",
}

BareMetal_ServiceDesc is the grpc.ServiceDesc for BareMetal service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_baremetal_baremetal_proto protoreflect.FileDescriptor

Functions

func RegisterBareMetalServer

func RegisterBareMetalServer(s grpc.ServiceRegistrar, srv BareMetalServer)

Types

type BareMetalClient

type BareMetalClient interface {
	Submit(ctx context.Context, in *Submission, opts ...grpc.CallOption) (*Job, error)
	JobStatus(ctx context.Context, in *JobIDList, opts ...grpc.CallOption) (*JobList, error)
	CancelJobs(ctx context.Context, in *JobIDList, opts ...grpc.CallOption) (*Error, error)
	FetchResults(ctx context.Context, in *JobIDList, opts ...grpc.CallOption) (*JobList, error)
	UpdateJobs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	RecoverJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Job, error)
}

BareMetalClient is the client API for BareMetal 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 NewBareMetalClient

func NewBareMetalClient(cc grpc.ClientConnInterface) BareMetalClient

type BareMetalServer

type BareMetalServer interface {
	Submit(context.Context, *Submission) (*Job, error)
	JobStatus(context.Context, *JobIDList) (*JobList, error)
	CancelJobs(context.Context, *JobIDList) (*Error, error)
	FetchResults(context.Context, *JobIDList) (*JobList, error)
	UpdateJobs(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	RecoverJob(context.Context, *Job) (*Job, error)
	// contains filtered or unexported methods
}

BareMetalServer is the server API for BareMetal service. All implementations must embed UnimplementedBareMetalServer for forward compatibility.

type Error

type Error struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Error is an error message about an operation.

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetError

func (x *Error) GetError() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Job

type Job struct {

	// ID is the overall baremetal unique job ID number.
	ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// Status is the current status of the job.
	Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=baremetal.Status" json:"status,omitempty"`
	// Source is info about the source of the job, e.g., simrun sim project.
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// Path is the path from the SSH home directory to launch the job in.
	// This path will be created on the server when the job is run.
	Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// Script is name of the job script to run, which must be at the top level
	// within the given tar file.
	Script string `protobuf:"bytes,5,opt,name=script,proto3" json:"script,omitempty"`
	// Files is the gzipped tar file of the job files set at submission.
	Files []byte `protobuf:"bytes,6,opt,name=files,proto3" json:"files,omitempty"`
	// ResultsGlob is a glob expression for the result files to get back
	// from the server (e.g., *.tsv). job.out is automatically included as well,
	// which has the job stdout, stederr output.
	ResultsGlob string `protobuf:"bytes,7,opt,name=resultsGlob,proto3" json:"resultsGlob,omitempty"`
	// Results is the gzipped tar file of the job result files, gathered
	// at completion or when queried for results.
	Results []byte `protobuf:"bytes,8,opt,name=results,proto3" json:"results,omitempty"`
	// Submit is the time submitted.
	Submit *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=submit,proto3" json:"submit,omitempty"`
	// Start is the time actually started.
	Start *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=start,proto3" json:"start,omitempty"`
	// End is the time stopped running.
	End *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=end,proto3" json:"end,omitempty"`
	// ServerName is the name of the server it is running / ran on. Empty for pending.
	ServerName string `protobuf:"bytes,12,opt,name=serverName,proto3" json:"serverName,omitempty"`
	// ServerGPU is the logical index of the GPU assigned to this job (0..N-1).
	ServerGPU int32 `protobuf:"varint,13,opt,name=serverGPU,proto3" json:"serverGPU,omitempty"`
	// PID is the process id of the job script.
	PID int64 `protobuf:"varint,14,opt,name=PID,proto3" json:"PID,omitempty"`
	// contains filtered or unexported fields
}

Job is one bare metal job.

func (*Job) Descriptor deprecated

func (*Job) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetEnd

func (x *Job) GetEnd() *timestamppb.Timestamp

func (*Job) GetFiles

func (x *Job) GetFiles() []byte

func (*Job) GetID

func (x *Job) GetID() int64

func (*Job) GetPID

func (x *Job) GetPID() int64

func (*Job) GetPath

func (x *Job) GetPath() string

func (*Job) GetResults

func (x *Job) GetResults() []byte

func (*Job) GetResultsGlob

func (x *Job) GetResultsGlob() string

func (*Job) GetScript

func (x *Job) GetScript() string

func (*Job) GetServerGPU

func (x *Job) GetServerGPU() int32

func (*Job) GetServerName

func (x *Job) GetServerName() string

func (*Job) GetSource

func (x *Job) GetSource() string

func (*Job) GetStart

func (x *Job) GetStart() *timestamppb.Timestamp

func (*Job) GetStatus

func (x *Job) GetStatus() Status

func (*Job) GetSubmit

func (x *Job) GetSubmit() *timestamppb.Timestamp

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

func (x *Job) ProtoReflect() protoreflect.Message

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type JobIDList

type JobIDList struct {
	JobID []int64 `protobuf:"varint,1,rep,packed,name=jobID,proto3" json:"jobID,omitempty"`
	// contains filtered or unexported fields
}

JobIDList is a list of unique job ID numbers

func (*JobIDList) Descriptor deprecated

func (*JobIDList) Descriptor() ([]byte, []int)

Deprecated: Use JobIDList.ProtoReflect.Descriptor instead.

func (*JobIDList) GetJobID

func (x *JobIDList) GetJobID() []int64

func (*JobIDList) ProtoMessage

func (*JobIDList) ProtoMessage()

func (*JobIDList) ProtoReflect

func (x *JobIDList) ProtoReflect() protoreflect.Message

func (*JobIDList) Reset

func (x *JobIDList) Reset()

func (*JobIDList) String

func (x *JobIDList) String() string

type JobList

type JobList struct {
	Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"`
	// contains filtered or unexported fields
}

JobList is a list of Jobs.

func (*JobList) Descriptor deprecated

func (*JobList) Descriptor() ([]byte, []int)

Deprecated: Use JobList.ProtoReflect.Descriptor instead.

func (*JobList) GetJobs

func (x *JobList) GetJobs() []*Job

func (*JobList) ProtoMessage

func (*JobList) ProtoMessage()

func (*JobList) ProtoReflect

func (x *JobList) ProtoReflect() protoreflect.Message

func (*JobList) Reset

func (x *JobList) Reset()

func (*JobList) String

func (x *JobList) String() string

type Status

type Status int32

Status are the job status values.

const (
	// NoStatus is the unknown status state.
	Status_NoStatus Status = 0
	// Pending means the job has been submitted, but not yet run.
	Status_Pending Status = 1
	// Running means the job is running.
	Status_Running Status = 2
	// Completed means the job finished on its own, with no error status.
	Status_Completed Status = 3
	// Canceled means the job was canceled by the user.
	Status_Canceled Status = 4
	// Errored means the job quit with an error
	Status_Errored Status = 5
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type Submission

type Submission struct {

	// Source is info about the source of the job, e.g., simrun sim project.
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Path is the path from the SSH home directory to launch the job in.
	// This path will be created on the server when the job is run.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// Script is name of the job script to run, which must be at the top level
	// within the given tar file.
	Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"`
	// ResultsGlob is a glob expression for the result files to get back
	// from the server (e.g., *.tsv). job.out is automatically included as well,
	// which has the job stdout, stederr output.
	ResultsGlob string `protobuf:"bytes,4,opt,name=resultsGlob,proto3" json:"resultsGlob,omitempty"`
	// Files is the gzipped tar file of the job files set at submission.
	Files []byte `protobuf:"bytes,5,opt,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

Submission is a job submission.

func (*Submission) Descriptor deprecated

func (*Submission) Descriptor() ([]byte, []int)

Deprecated: Use Submission.ProtoReflect.Descriptor instead.

func (*Submission) GetFiles

func (x *Submission) GetFiles() []byte

func (*Submission) GetPath

func (x *Submission) GetPath() string

func (*Submission) GetResultsGlob

func (x *Submission) GetResultsGlob() string

func (*Submission) GetScript

func (x *Submission) GetScript() string

func (*Submission) GetSource

func (x *Submission) GetSource() string

func (*Submission) ProtoMessage

func (*Submission) ProtoMessage()

func (*Submission) ProtoReflect

func (x *Submission) ProtoReflect() protoreflect.Message

func (*Submission) Reset

func (x *Submission) Reset()

func (*Submission) String

func (x *Submission) String() string

type UnimplementedBareMetalServer

type UnimplementedBareMetalServer struct{}

UnimplementedBareMetalServer 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 (UnimplementedBareMetalServer) CancelJobs

func (UnimplementedBareMetalServer) FetchResults

func (UnimplementedBareMetalServer) JobStatus

func (UnimplementedBareMetalServer) RecoverJob added in v0.1.3

func (UnimplementedBareMetalServer) Submit

func (UnimplementedBareMetalServer) UpdateJobs

type UnsafeBareMetalServer

type UnsafeBareMetalServer interface {
	// contains filtered or unexported methods
}

UnsafeBareMetalServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BareMetalServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL