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: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Status_name = map[int32]string{
	0: "Complete",
	1: "Failed",
	2: "Missing",
	3: "Running",
	4: "Waiting",
}
View Source
var Status_value = map[string]int32{
	"Complete": 0,
	"Failed":   1,
	"Missing":  2,
	"Running":  3,
	"Waiting":  4,
}

Functions

func RegisterCloudRPCServer

func RegisterCloudRPCServer(s *grpc.Server, srv CloudRPCServer)

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 ...grpc.CallOption) (*JobStatus, error)
	// Status returns the status of the simulation with the
	// requested name.
	Status(ctx context.Context, in *JobName, opts ...grpc.CallOption) (*JobStatus, error)
	// Output returns the output file(s) of the
	// requested simulation name.
	Output(ctx context.Context, in *JobName, opts ...grpc.CallOption) (*JobOutput, error)
	// Delete deletes the specified simulation.
	Delete(ctx context.Context, in *JobName, opts ...grpc.CallOption) (*JobName, error)
}

CloudRPCClient is the client API for CloudRPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCloudRPCClient

func NewCloudRPCClient(cc *grpc.ClientConn) CloudRPCClient

type CloudRPCServer

type CloudRPCServer interface {
	// RunJob performs an InMAP simulation and returns the paths to the
	// output file(s).
	RunJob(context.Context, *JobSpec) (*JobStatus, error)
	// Status returns the status of the simulation with the
	// requested name.
	Status(context.Context, *JobName) (*JobStatus, error)
	// Output returns the output file(s) of the
	// requested simulation name.
	Output(context.Context, *JobName) (*JobOutput, error)
	// Delete deletes the specified simulation.
	Delete(context.Context, *JobName) (*JobName, error)
}

CloudRPCServer is the server API for CloudRPC service.

type JobName

type JobName struct {
	// Version is the required InMAP version.
	Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
	// Name is a user-specified name for the job.
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JobName) Descriptor

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

func (*JobName) GetName

func (m *JobName) GetName() string

func (*JobName) GetVersion

func (m *JobName) GetVersion() string

func (*JobName) ProtoMessage

func (*JobName) ProtoMessage()

func (*JobName) Reset

func (m *JobName) Reset()

func (*JobName) String

func (m *JobName) String() string

func (*JobName) XXX_DiscardUnknown

func (m *JobName) XXX_DiscardUnknown()

func (*JobName) XXX_Marshal

func (m *JobName) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobName) XXX_Merge

func (m *JobName) XXX_Merge(src proto.Message)

func (*JobName) XXX_Size

func (m *JobName) XXX_Size() int

func (*JobName) XXX_Unmarshal

func (m *JobName) XXX_Unmarshal(b []byte) error

type JobOutput

type JobOutput struct {
	// Files holds the contents of each output file.
	Files                map[string][]byte `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*JobOutput) Descriptor

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

func (*JobOutput) GetFiles

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

func (*JobOutput) ProtoMessage

func (*JobOutput) ProtoMessage()

func (*JobOutput) Reset

func (m *JobOutput) Reset()

func (*JobOutput) String

func (m *JobOutput) String() string

func (*JobOutput) XXX_DiscardUnknown

func (m *JobOutput) XXX_DiscardUnknown()

func (*JobOutput) XXX_Marshal

func (m *JobOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobOutput) XXX_Merge

func (m *JobOutput) XXX_Merge(src proto.Message)

func (*JobOutput) XXX_Size

func (m *JobOutput) XXX_Size() int

func (*JobOutput) XXX_Unmarshal

func (m *JobOutput) XXX_Unmarshal(b []byte) error

type JobSpec

type JobSpec struct {
	// Version is the required InMAP version.
	Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
	// Name is a user-specified name for the job.
	Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	// Cmd is the command to be run, e.g., [inmap run steady]
	Cmd []string `protobuf:"bytes,3,rep,name=Cmd,proto3" json:"Cmd,omitempty"`
	// Args are the command line arguments, e.g., [--Layers, 2, --steady, true]
	Args []string `protobuf:"bytes,4,rep,name=Args,proto3" json:"Args,omitempty"`
	// MemoryGB specifies the required gigabytes of RAM memory for the
	// simulation.
	MemoryGB int32 `protobuf:"varint,5,opt,name=MemoryGB,proto3" json:"MemoryGB,omitempty"`
	// FileData holds the contents of any local files referred to by Args
	FileData             map[string][]byte `` /* 157-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

JobSpec is the input for the RunJob service.

func (*JobSpec) Descriptor

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

func (*JobSpec) GetArgs

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

func (*JobSpec) GetCmd

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

func (*JobSpec) GetFileData

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

func (*JobSpec) GetMemoryGB

func (m *JobSpec) GetMemoryGB() int32

func (*JobSpec) GetName

func (m *JobSpec) GetName() string

func (*JobSpec) GetVersion

func (m *JobSpec) GetVersion() string

func (*JobSpec) ProtoMessage

func (*JobSpec) ProtoMessage()

func (*JobSpec) Reset

func (m *JobSpec) Reset()

func (*JobSpec) String

func (m *JobSpec) String() string

func (*JobSpec) XXX_DiscardUnknown

func (m *JobSpec) XXX_DiscardUnknown()

func (*JobSpec) XXX_Marshal

func (m *JobSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobSpec) XXX_Merge

func (m *JobSpec) XXX_Merge(src proto.Message)

func (*JobSpec) XXX_Size

func (m *JobSpec) XXX_Size() int

func (*JobSpec) XXX_Unmarshal

func (m *JobSpec) XXX_Unmarshal(b []byte) error

type JobStatus

type JobStatus struct {
	// Status holds the current status of the job.
	Status  Status `protobuf:"varint,1,opt,name=Status,proto3,enum=cloudrpc.Status" json:"Status,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// Unix time, the number of seconds elapsed since January 1, 1970 UTC
	StartTime            int64    `protobuf:"varint,3,opt,name=StartTime,proto3" json:"StartTime,omitempty"`
	CompletionTime       int64    `protobuf:"varint,4,opt,name=CompletionTime,proto3" json:"CompletionTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JobStatus) Descriptor

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

func (*JobStatus) GetCompletionTime

func (m *JobStatus) GetCompletionTime() int64

func (*JobStatus) GetMessage

func (m *JobStatus) GetMessage() string

func (*JobStatus) GetStartTime

func (m *JobStatus) GetStartTime() int64

func (*JobStatus) GetStatus

func (m *JobStatus) GetStatus() Status

func (*JobStatus) ProtoMessage

func (*JobStatus) ProtoMessage()

func (*JobStatus) Reset

func (m *JobStatus) Reset()

func (*JobStatus) String

func (m *JobStatus) String() string

func (*JobStatus) XXX_DiscardUnknown

func (m *JobStatus) XXX_DiscardUnknown()

func (*JobStatus) XXX_Marshal

func (m *JobStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobStatus) XXX_Merge

func (m *JobStatus) XXX_Merge(src proto.Message)

func (*JobStatus) XXX_Size

func (m *JobStatus) XXX_Size() int

func (*JobStatus) XXX_Unmarshal

func (m *JobStatus) XXX_Unmarshal(b []byte) error

type Status

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

func (Status) EnumDescriptor

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

func (Status) String

func (x Status) String() string

Directories

Path Synopsis
Package cloudrpc is a generated protocol buffer package.
Package cloudrpc is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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