Documentation ¶
Overview ¶
Package cloudrpc is a generated protocol buffer package.
It is generated from these files:
cloud.proto
It has these top-level messages:
JobSpec JobStatus JobOutput JobName
Index ¶
- Variables
- type CloudRPCClient
- type JobName
- type JobOutput
- type JobSpec
- func (m *JobSpec) GetArgs() (x []string)
- func (m *JobSpec) GetCmd() (x []string)
- func (m *JobSpec) GetFileData() (x map[string][]byte)
- func (m *JobSpec) GetMemoryGB() (x int32)
- func (m *JobSpec) GetName() (x string)
- func (m *JobSpec) GetVersion() (x string)
- func (m *JobSpec) Marshal() []byte
- func (m *JobSpec) MarshalToWriter(writer jspb.Writer)
- func (m *JobSpec) Unmarshal(rawBytes []byte) (*JobSpec, error)
- func (m *JobSpec) UnmarshalFromReader(reader jspb.Reader) *JobSpec
- type JobStatus
- func (m *JobStatus) GetCompletionTime() (x int64)
- func (m *JobStatus) GetMessage() (x string)
- func (m *JobStatus) GetStartTime() (x int64)
- func (m *JobStatus) GetStatus() (x Status)
- func (m *JobStatus) Marshal() []byte
- func (m *JobStatus) MarshalToWriter(writer jspb.Writer)
- func (m *JobStatus) Unmarshal(rawBytes []byte) (*JobStatus, error)
- func (m *JobStatus) UnmarshalFromReader(reader jspb.Reader) *JobStatus
- type Status
Constants ¶
This section is empty.
Variables ¶
var Status_name = map[int]string{
0: "Complete",
1: "Failed",
2: "Missing",
3: "Running",
4: "Waiting",
}
var Status_value = map[string]int{
"Complete": 0,
"Failed": 1,
"Missing": 2,
"Running": 3,
"Waiting": 4,
}
Functions ¶
This section is empty.
Types ¶
type CloudRPCClient ¶
type CloudRPCClient interface { // RunJob performs an InMAP simulation and returns the paths to the // output file(s). RunJob(ctx context.Context, in *JobSpec, opts ...grpcweb.CallOption) (*JobStatus, error) // Status returns the status of the simulation with the // requested name. Status(ctx context.Context, in *JobName, opts ...grpcweb.CallOption) (*JobStatus, error) // Output returns the output file(s) of the // requested simulation name. Output(ctx context.Context, in *JobName, opts ...grpcweb.CallOption) (*JobOutput, error) // Delete deletes the specified simulation. Delete(ctx context.Context, in *JobName, opts ...grpcweb.CallOption) (*JobName, error) }
func NewCloudRPCClient ¶
func NewCloudRPCClient(hostname string, opts ...grpcweb.DialOption) CloudRPCClient
NewCloudRPCClient creates a new gRPC-Web client.
type JobName ¶
type JobName struct { // Version is the required InMAP version. Version string // Name is a user-specified name for the job. Name string }
func (*JobName) GetVersion ¶
GetVersion gets the Version of the JobName.
func (*JobName) MarshalToWriter ¶
MarshalToWriter marshals JobName to the provided writer.
type JobOutput ¶
func (*JobOutput) MarshalToWriter ¶
MarshalToWriter marshals JobOutput to the provided writer.
type JobSpec ¶
type JobSpec struct { // Version is the required InMAP version. Version string // Name is a user-specified name for the job. Name string // Cmd is the command to be run, e.g., [inmap run steady] Cmd []string // Args are the command line arguments, e.g., [--Layers, 2, --steady, true] Args []string // MemoryGB specifies the required gigabytes of RAM memory for the // simulation. MemoryGB int32 // FileData holds the contents of any local files referred to by Args FileData map[string][]byte }
JobSpec is the input for the RunJob service.
func (*JobSpec) GetFileData ¶
GetFileData gets the FileData of the JobSpec.
func (*JobSpec) GetMemoryGB ¶
GetMemoryGB gets the MemoryGB of the JobSpec.
func (*JobSpec) GetVersion ¶
GetVersion gets the Version of the JobSpec.
func (*JobSpec) MarshalToWriter ¶
MarshalToWriter marshals JobSpec to the provided writer.
type JobStatus ¶
type JobStatus struct { // Status holds the current status of the job. Status Status Message string // Unix time, the number of seconds elapsed since January 1, 1970 UTC StartTime int64 CompletionTime int64 }
func (*JobStatus) GetCompletionTime ¶
GetCompletionTime gets the CompletionTime of the JobStatus.
func (*JobStatus) GetMessage ¶
GetMessage gets the Message of the JobStatus.
func (*JobStatus) GetStartTime ¶
GetStartTime gets the StartTime of the JobStatus.
func (*JobStatus) MarshalToWriter ¶
MarshalToWriter marshals JobStatus to the provided writer.