cloudrpc

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var Status_name = map[int]string{
	0: "Complete",
	1: "Failed",
	2: "Missing",
	3: "Running",
	4: "Waiting",
}
View Source
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) GetName

func (m *JobName) GetName() (x string)

GetName gets the Name of the JobName.

func (*JobName) GetVersion

func (m *JobName) GetVersion() (x string)

GetVersion gets the Version of the JobName.

func (*JobName) Marshal

func (m *JobName) Marshal() []byte

Marshal marshals JobName to a slice of bytes.

func (*JobName) MarshalToWriter

func (m *JobName) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals JobName to the provided writer.

func (*JobName) Unmarshal

func (m *JobName) Unmarshal(rawBytes []byte) (*JobName, error)

Unmarshal unmarshals a JobName from a slice of bytes.

func (*JobName) UnmarshalFromReader

func (m *JobName) UnmarshalFromReader(reader jspb.Reader) *JobName

UnmarshalFromReader unmarshals a JobName from the provided reader.

type JobOutput

type JobOutput struct {
	// Files holds the contents of each output file.
	Files map[string][]byte
}

func (*JobOutput) GetFiles

func (m *JobOutput) GetFiles() (x map[string][]byte)

GetFiles gets the Files of the JobOutput.

func (*JobOutput) Marshal

func (m *JobOutput) Marshal() []byte

Marshal marshals JobOutput to a slice of bytes.

func (*JobOutput) MarshalToWriter

func (m *JobOutput) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals JobOutput to the provided writer.

func (*JobOutput) Unmarshal

func (m *JobOutput) Unmarshal(rawBytes []byte) (*JobOutput, error)

Unmarshal unmarshals a JobOutput from a slice of bytes.

func (*JobOutput) UnmarshalFromReader

func (m *JobOutput) UnmarshalFromReader(reader jspb.Reader) *JobOutput

UnmarshalFromReader unmarshals a JobOutput from the provided reader.

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) GetArgs

func (m *JobSpec) GetArgs() (x []string)

GetArgs gets the Args of the JobSpec.

func (*JobSpec) GetCmd

func (m *JobSpec) GetCmd() (x []string)

GetCmd gets the Cmd of the JobSpec.

func (*JobSpec) GetFileData

func (m *JobSpec) GetFileData() (x map[string][]byte)

GetFileData gets the FileData of the JobSpec.

func (*JobSpec) GetMemoryGB

func (m *JobSpec) GetMemoryGB() (x int32)

GetMemoryGB gets the MemoryGB of the JobSpec.

func (*JobSpec) GetName

func (m *JobSpec) GetName() (x string)

GetName gets the Name of the JobSpec.

func (*JobSpec) GetVersion

func (m *JobSpec) GetVersion() (x string)

GetVersion gets the Version of the JobSpec.

func (*JobSpec) Marshal

func (m *JobSpec) Marshal() []byte

Marshal marshals JobSpec to a slice of bytes.

func (*JobSpec) MarshalToWriter

func (m *JobSpec) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals JobSpec to the provided writer.

func (*JobSpec) Unmarshal

func (m *JobSpec) Unmarshal(rawBytes []byte) (*JobSpec, error)

Unmarshal unmarshals a JobSpec from a slice of bytes.

func (*JobSpec) UnmarshalFromReader

func (m *JobSpec) UnmarshalFromReader(reader jspb.Reader) *JobSpec

UnmarshalFromReader unmarshals a JobSpec from the provided reader.

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

func (m *JobStatus) GetCompletionTime() (x int64)

GetCompletionTime gets the CompletionTime of the JobStatus.

func (*JobStatus) GetMessage

func (m *JobStatus) GetMessage() (x string)

GetMessage gets the Message of the JobStatus.

func (*JobStatus) GetStartTime

func (m *JobStatus) GetStartTime() (x int64)

GetStartTime gets the StartTime of the JobStatus.

func (*JobStatus) GetStatus

func (m *JobStatus) GetStatus() (x Status)

GetStatus gets the Status of the JobStatus.

func (*JobStatus) Marshal

func (m *JobStatus) Marshal() []byte

Marshal marshals JobStatus to a slice of bytes.

func (*JobStatus) MarshalToWriter

func (m *JobStatus) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals JobStatus to the provided writer.

func (*JobStatus) Unmarshal

func (m *JobStatus) Unmarshal(rawBytes []byte) (*JobStatus, error)

Unmarshal unmarshals a JobStatus from a slice of bytes.

func (*JobStatus) UnmarshalFromReader

func (m *JobStatus) UnmarshalFromReader(reader jspb.Reader) *JobStatus

UnmarshalFromReader unmarshals a JobStatus from the provided reader.

type Status

type Status int
const (
	Status_Complete Status = 0
	Status_Failed   Status = 1
	Status_Missing  Status = 2
	Status_Running  Status = 3
	Status_Waiting  Status = 4
)

func (Status) String

func (x Status) String() string

Jump to

Keyboard shortcuts

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