inmap: github.com/spatialmodel/inmap/cloud/cloudrpc Index | Files | Directories

package cloudrpc

import "github.com/spatialmodel/inmap/cloud/cloudrpc"

Index

Package Files

cloud.pb.go

Variables

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

func RegisterCloudRPCServer Uses

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

type CloudRPCClient Uses

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 Uses

func NewCloudRPCClient(cc *grpc.ClientConn) CloudRPCClient

type CloudRPCServer Uses

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 Uses

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 Uses

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

func (*JobName) GetName Uses

func (m *JobName) GetName() string

func (*JobName) GetVersion Uses

func (m *JobName) GetVersion() string

func (*JobName) ProtoMessage Uses

func (*JobName) ProtoMessage()

func (*JobName) Reset Uses

func (m *JobName) Reset()

func (*JobName) String Uses

func (m *JobName) String() string

func (*JobName) XXX_DiscardUnknown Uses

func (m *JobName) XXX_DiscardUnknown()

func (*JobName) XXX_Marshal Uses

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

func (*JobName) XXX_Merge Uses

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

func (*JobName) XXX_Size Uses

func (m *JobName) XXX_Size() int

func (*JobName) XXX_Unmarshal Uses

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

type JobOutput Uses

type JobOutput struct {
    // Files holds the contents of each output file.
    Files                map[string][]byte `protobuf:"bytes,1,rep,name=Files,proto3" json:"Files,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*JobOutput) Descriptor Uses

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

func (*JobOutput) GetFiles Uses

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

func (*JobOutput) ProtoMessage Uses

func (*JobOutput) ProtoMessage()

func (*JobOutput) Reset Uses

func (m *JobOutput) Reset()

func (*JobOutput) String Uses

func (m *JobOutput) String() string

func (*JobOutput) XXX_DiscardUnknown Uses

func (m *JobOutput) XXX_DiscardUnknown()

func (*JobOutput) XXX_Marshal Uses

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

func (*JobOutput) XXX_Merge Uses

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

func (*JobOutput) XXX_Size Uses

func (m *JobOutput) XXX_Size() int

func (*JobOutput) XXX_Unmarshal Uses

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

type JobSpec Uses

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 `protobuf:"bytes,7,rep,name=FileData,proto3" json:"FileData,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

JobSpec is the input for the RunJob service.

func (*JobSpec) Descriptor Uses

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

func (*JobSpec) GetArgs Uses

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

func (*JobSpec) GetCmd Uses

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

func (*JobSpec) GetFileData Uses

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

func (*JobSpec) GetMemoryGB Uses

func (m *JobSpec) GetMemoryGB() int32

func (*JobSpec) GetName Uses

func (m *JobSpec) GetName() string

func (*JobSpec) GetVersion Uses

func (m *JobSpec) GetVersion() string

func (*JobSpec) ProtoMessage Uses

func (*JobSpec) ProtoMessage()

func (*JobSpec) Reset Uses

func (m *JobSpec) Reset()

func (*JobSpec) String Uses

func (m *JobSpec) String() string

func (*JobSpec) XXX_DiscardUnknown Uses

func (m *JobSpec) XXX_DiscardUnknown()

func (*JobSpec) XXX_Marshal Uses

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

func (*JobSpec) XXX_Merge Uses

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

func (*JobSpec) XXX_Size Uses

func (m *JobSpec) XXX_Size() int

func (*JobSpec) XXX_Unmarshal Uses

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

type JobStatus Uses

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 Uses

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

func (*JobStatus) GetCompletionTime Uses

func (m *JobStatus) GetCompletionTime() int64

func (*JobStatus) GetMessage Uses

func (m *JobStatus) GetMessage() string

func (*JobStatus) GetStartTime Uses

func (m *JobStatus) GetStartTime() int64

func (*JobStatus) GetStatus Uses

func (m *JobStatus) GetStatus() Status

func (*JobStatus) ProtoMessage Uses

func (*JobStatus) ProtoMessage()

func (*JobStatus) Reset Uses

func (m *JobStatus) Reset()

func (*JobStatus) String Uses

func (m *JobStatus) String() string

func (*JobStatus) XXX_DiscardUnknown Uses

func (m *JobStatus) XXX_DiscardUnknown()

func (*JobStatus) XXX_Marshal Uses

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

func (*JobStatus) XXX_Merge Uses

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

func (*JobStatus) XXX_Size Uses

func (m *JobStatus) XXX_Size() int

func (*JobStatus) XXX_Unmarshal Uses

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

type Status Uses

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 Uses

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

func (Status) String Uses

func (x Status) String() string

Directories

PathSynopsis
cloudrpcgojsPackage cloudrpc is a generated protocol buffer package.

Package cloudrpc imports 5 packages (graph) and is imported by 3 packages. Updated 2019-05-13. Refresh now. Tools for package owners.