initial commit
This commit is contained in:
commit
506629b894
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
29
example.js
Normal file
29
example.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
exports.__esModule = true;
|
||||||
|
var common_pb_1 = require("./proto/generated/common_pb");
|
||||||
|
var controller_pb_1 = require("./proto/generated/controller_pb");
|
||||||
|
var server_pb_1 = require("./proto/generated/server_pb");
|
||||||
|
var fs = require("fs");
|
||||||
|
var controller_grpc_pb_1 = require("./proto/generated/controller_grpc_pb");
|
||||||
|
var grpc = require("@grpc/grpc-js");
|
||||||
|
var credentials = grpc.credentials.combineChannelCredentials(grpc.credentials.createSsl(), grpc.credentials.createFromMetadataGenerator(function (_, callback) {
|
||||||
|
var md = new grpc.Metadata();
|
||||||
|
md.add("auth-key", "f2588f17f0bfc75c323dc5f9b5da83e0");
|
||||||
|
md.add("auth-key-id", "648b02a4-e2cd-430c-8bac-4ca2712dad18");
|
||||||
|
callback(null, md);
|
||||||
|
}));
|
||||||
|
var client = new controller_grpc_pb_1.IsolateControllerClient("api.shark.fal.ai", credentials);
|
||||||
|
var req = new controller_pb_1.HostedRun();
|
||||||
|
var serObj = new common_pb_1.SerializedObject();
|
||||||
|
var definition = fs.readFileSync('/Users/gorkemyurtseven/dev/koldstart-playground/koldstart-javascript/python.dump');
|
||||||
|
serObj.setMethod("dill");
|
||||||
|
serObj.setDefinition(definition);
|
||||||
|
serObj.setWasItRaised(false);
|
||||||
|
serObj.setStringizedTraceback("");
|
||||||
|
var environment = new server_pb_1.EnvironmentDefinition();
|
||||||
|
environment.setKind("virtualenv");
|
||||||
|
req.setFunction(serObj);
|
||||||
|
req.setEnvironmentsList([environment]);
|
||||||
|
client.run(req).on("data", function (data) {
|
||||||
|
console.log(data.toObject());
|
||||||
|
});
|
||||||
40
example.ts
Normal file
40
example.ts
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { SerializedObject } from "./proto/generated/common_pb";
|
||||||
|
import { HostedRun } from "./proto/generated/controller_pb";
|
||||||
|
import { EnvironmentDefinition } from "./proto/generated/server_pb";
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import { IsolateControllerClient } from "./proto/generated/controller_grpc_pb";
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
|
||||||
|
const credentials: grpc.ChannelCredentials = grpc.credentials.combineChannelCredentials(
|
||||||
|
grpc.credentials.createSsl(),
|
||||||
|
grpc.credentials.createFromMetadataGenerator((_, callback) => {
|
||||||
|
const md = new grpc.Metadata();
|
||||||
|
md.add("auth-key", "f2588f17f0bfc75c323dc5f9b5da83e0")
|
||||||
|
md.add("auth-key-id", "648b02a4-e2cd-430c-8bac-4ca2712dad18")
|
||||||
|
callback(null, md);
|
||||||
|
})
|
||||||
|
)
|
||||||
|
const client = new IsolateControllerClient("api.shark.fal.ai", credentials);
|
||||||
|
const req = new HostedRun();
|
||||||
|
|
||||||
|
const serObj = new SerializedObject();
|
||||||
|
|
||||||
|
let definition = fs.readFileSync('/Users/gorkemyurtseven/dev/koldstart-playground/koldstart-javascript/python.dump')
|
||||||
|
|
||||||
|
serObj.setMethod("dill");
|
||||||
|
serObj.setDefinition(definition)
|
||||||
|
serObj.setWasItRaised(false);
|
||||||
|
serObj.setStringizedTraceback("");
|
||||||
|
|
||||||
|
const environment = new EnvironmentDefinition();
|
||||||
|
environment.setKind("virtualenv");
|
||||||
|
|
||||||
|
req.setFunction(serObj);
|
||||||
|
req.setEnvironmentsList([environment]);
|
||||||
|
|
||||||
|
client.run(req).on("data", (data) => {
|
||||||
|
console.log(data.toObject());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
koldstart("gorkemyurt/stable-diffusion").run("create me a turtle")
|
||||||
3833
package-lock.json
generated
Normal file
3833
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
package.json
Normal file
26
package.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"name": "javascript",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "example.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@bufbuild/buf": "^1.14.0-1",
|
||||||
|
"@grpc/grpc-js": "^1.8.10",
|
||||||
|
"@improbable-eng/grpc-web": "^0.15.0",
|
||||||
|
"@types/node": "^18.14.0",
|
||||||
|
"fs": "^0.0.1-security",
|
||||||
|
"install": "^0.13.0",
|
||||||
|
"npm": "^9.5.0",
|
||||||
|
"ts-protoc-gen": "^0.15.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"grpc_tools_node_protoc_ts": "^5.3.3",
|
||||||
|
"grpc-tools": "^1.12.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
46
proto/common.proto
Normal file
46
proto/common.proto
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
message SerializedObject {
|
||||||
|
// The serialization method used to serialize the the raw_object. Must be
|
||||||
|
// present in the environment that is running the agent itself.
|
||||||
|
string method = 1;
|
||||||
|
// The Python object serialized with the method above.
|
||||||
|
bytes definition = 2;
|
||||||
|
// A flag indicating whether the given object was raised (e.g. an exception
|
||||||
|
// that was captured) or not.
|
||||||
|
bool was_it_raised = 3;
|
||||||
|
// The stringized version of the traceback, if it was raised.
|
||||||
|
optional string stringized_traceback = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PartialRunResult {
|
||||||
|
// A flag indicating whether the run has completed.
|
||||||
|
bool is_complete = 1;
|
||||||
|
// A list of logs collected during this partial execution. It does
|
||||||
|
// not include old logs.
|
||||||
|
repeated Log logs = 2;
|
||||||
|
// The result of the run, if it is complete.
|
||||||
|
optional SerializedObject result = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Log {
|
||||||
|
string message = 1;
|
||||||
|
LogSource source = 2;
|
||||||
|
LogLevel level = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum LogSource {
|
||||||
|
BUILDER = 0;
|
||||||
|
BRIDGE = 1;
|
||||||
|
USER = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum LogLevel {
|
||||||
|
TRACE = 0;
|
||||||
|
DEBUG = 1;
|
||||||
|
INFO = 2;
|
||||||
|
WARNING = 3;
|
||||||
|
ERROR = 4;
|
||||||
|
STDOUT = 5;
|
||||||
|
STDERR = 6;
|
||||||
|
}
|
||||||
198
proto/controller.proto
Normal file
198
proto/controller.proto
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
import "common.proto";
|
||||||
|
import "server.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
package controller;
|
||||||
|
|
||||||
|
service IsolateController {
|
||||||
|
// Run the given function on the specified environment. Streams logs
|
||||||
|
// and the result originating from that function.
|
||||||
|
rpc Run (HostedRun) returns (stream HostedRunResult) {}
|
||||||
|
// Run the given function in parallel with the given inputs
|
||||||
|
rpc Map (HostedMap) returns (stream HostedRunResult) {}
|
||||||
|
// Schedule the given function to be run with the specified cron.
|
||||||
|
rpc Schedule (HostedRunCron) returns (ScheduleInfo) {}
|
||||||
|
// List scheduled runs.
|
||||||
|
rpc ListScheduledRuns (ListScheduledRunsRequest) returns (ListScheduledRunsResponse) {}
|
||||||
|
// Cancel a scheduled run.
|
||||||
|
rpc CancelScheduledRun (CancelScheduledRunRequest) returns (CancelScheduledRunResponse) {}
|
||||||
|
// List all the activations of one scheduled run.
|
||||||
|
rpc ListScheduledRunActivations (ListScheduledRunActivationsRequest) returns (ListScheduledRunActivationsResponse) {}
|
||||||
|
// Get logs from a particular activation of a scheduled run.
|
||||||
|
rpc GetScheduledActivationLogs (GetScheduledActivationLogsRequest) returns (GetScheduledActivationLogsResponse) {}
|
||||||
|
// Creates an authentication key for a user
|
||||||
|
rpc CreateUserKey (CreateUserKeyRequest) returns (CreateUserKeyResponse) {}
|
||||||
|
// Lists the user's authentication keys
|
||||||
|
rpc ListUserKeys (ListUserKeysRequest) returns (ListUserKeysResponse) {}
|
||||||
|
// Revokes an authentication key for a user
|
||||||
|
rpc RevokeUserKey (RevokeUserKeyRequest) returns (RevokeUserKeyResponse) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
message HostedMap {
|
||||||
|
// Environment definitions.
|
||||||
|
repeated EnvironmentDefinition environments = 1;
|
||||||
|
// Machine requirements
|
||||||
|
optional MachineRequirements machine_requirements = 2;
|
||||||
|
// Function to run.
|
||||||
|
SerializedObject function = 3;
|
||||||
|
// Inputs to the function
|
||||||
|
repeated SerializedObject inputs = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HostedRun {
|
||||||
|
// Environment definitions.
|
||||||
|
repeated EnvironmentDefinition environments = 1;
|
||||||
|
// Machine requirements
|
||||||
|
optional MachineRequirements machine_requirements = 2;
|
||||||
|
// Function to run.
|
||||||
|
SerializedObject function = 3;
|
||||||
|
// Optional setup function to pass as the first argument to the function.
|
||||||
|
optional SerializedObject setup_func = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HostedRunCron {
|
||||||
|
// Environment definitions.
|
||||||
|
repeated EnvironmentDefinition environments = 1;
|
||||||
|
// Machine requirements
|
||||||
|
optional MachineRequirements machine_requirements = 2;
|
||||||
|
// Function to run.
|
||||||
|
SerializedObject function = 3;
|
||||||
|
// cron string to represent the run schedule
|
||||||
|
string cron = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelScheduledRunRequest {
|
||||||
|
// The id of the scheduled run to cancel.
|
||||||
|
string run_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelScheduledRunResponse {
|
||||||
|
// Empty. For future use.
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListScheduledRunsRequest {
|
||||||
|
// Empty. For future use.
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListScheduledRunActivationsRequest {
|
||||||
|
// The id of the scheduled run to list activations for.
|
||||||
|
string run_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListScheduledRunActivationsResponse {
|
||||||
|
// The list of activations (which correspond to timestamps)
|
||||||
|
repeated string activation_ids = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListScheduledRunsResponse {
|
||||||
|
repeated ScheduleInfo scheduled_runs = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetScheduledActivationLogsRequest {
|
||||||
|
// The id of the scheduled run to get.
|
||||||
|
string run_id = 1;
|
||||||
|
|
||||||
|
// The id of the activation to get logs for.
|
||||||
|
string activation_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetScheduledActivationLogsResponse {
|
||||||
|
// All the logs from this activation (the format is TBD, currently raw strings).
|
||||||
|
bytes raw_logs = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateUserKeyRequest {
|
||||||
|
// Empty. For future use.
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateUserKeyResponse {
|
||||||
|
string key_secret = 1;
|
||||||
|
string key_id = 2;
|
||||||
|
optional string description = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListUserKeysRequest {
|
||||||
|
// Empty. For future use.
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListUserKeysResponse {
|
||||||
|
repeated UserKeyInfo user_keys = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RevokeUserKeyRequest {
|
||||||
|
string key_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RevokeUserKeyResponse {
|
||||||
|
// Empty. For future use.
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserKeyInfo {
|
||||||
|
string key_id = 1;
|
||||||
|
google.protobuf.Timestamp created_at = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ScheduleInfo {
|
||||||
|
// Unique run id / token.
|
||||||
|
string run_id = 1;
|
||||||
|
|
||||||
|
enum State {
|
||||||
|
// The run has been scheduled.
|
||||||
|
SCHEDULED = 0;
|
||||||
|
// The run has failed because of isolate.
|
||||||
|
INTERNAL_FAILURE = 1;
|
||||||
|
// The run has been cancelled.
|
||||||
|
CANCELLED = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The state of the run.
|
||||||
|
State state = 2;
|
||||||
|
|
||||||
|
// Cron string to represent the run schedule.
|
||||||
|
string cron = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HostedRunResult {
|
||||||
|
// Unique run id / token.
|
||||||
|
string run_id = 1;
|
||||||
|
|
||||||
|
// Optionally the status of the current run (in terms of
|
||||||
|
// fal cloud).
|
||||||
|
optional HostedRunStatus status = 2;
|
||||||
|
|
||||||
|
// The most recent logs from the run.
|
||||||
|
repeated Log logs = 3;
|
||||||
|
|
||||||
|
// The result of the run, if it is complete (indicated by
|
||||||
|
// status.is_complete).
|
||||||
|
optional SerializedObject return_value = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HostedRunStatus {
|
||||||
|
enum State {
|
||||||
|
// The run is in progress.
|
||||||
|
IN_PROGRESS = 0;
|
||||||
|
// The run has completed successfully.
|
||||||
|
SUCCESS = 1;
|
||||||
|
// The run has failed because of isolate.
|
||||||
|
INTERNAL_FAILURE = 2;
|
||||||
|
// TODO: probably QUEUED, etc.
|
||||||
|
}
|
||||||
|
|
||||||
|
// The state of the run.
|
||||||
|
State state = 1;
|
||||||
|
|
||||||
|
// TODO: probably a free form struct for more detailed
|
||||||
|
// information (how it crashed, position in queue, etc).
|
||||||
|
}
|
||||||
|
|
||||||
|
message MachineRequirements {
|
||||||
|
// Machine type. It is not an enum because we want to be able
|
||||||
|
// to dynamically add new machine types without regenerating
|
||||||
|
// both the client and the server. Validation is done at the
|
||||||
|
// server side.
|
||||||
|
string machine_type = 1;
|
||||||
|
optional int32 keep_alive = 2;
|
||||||
|
}
|
||||||
1
proto/generated/common_grpc_pb.js
Normal file
1
proto/generated/common_grpc_pb.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
// GENERATED CODE -- NO SERVICES IN PROTO
|
||||||
114
proto/generated/common_pb.d.ts
vendored
Normal file
114
proto/generated/common_pb.d.ts
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
// package:
|
||||||
|
// file: common.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
|
||||||
|
export class SerializedObject extends jspb.Message {
|
||||||
|
getMethod(): string;
|
||||||
|
setMethod(value: string): SerializedObject;
|
||||||
|
getDefinition(): Uint8Array | string;
|
||||||
|
getDefinition_asU8(): Uint8Array;
|
||||||
|
getDefinition_asB64(): string;
|
||||||
|
setDefinition(value: Uint8Array | string): SerializedObject;
|
||||||
|
getWasItRaised(): boolean;
|
||||||
|
setWasItRaised(value: boolean): SerializedObject;
|
||||||
|
|
||||||
|
hasStringizedTraceback(): boolean;
|
||||||
|
clearStringizedTraceback(): void;
|
||||||
|
getStringizedTraceback(): string | undefined;
|
||||||
|
setStringizedTraceback(value: string): SerializedObject;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): SerializedObject.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: SerializedObject): SerializedObject.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: SerializedObject, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): SerializedObject;
|
||||||
|
static deserializeBinaryFromReader(message: SerializedObject, reader: jspb.BinaryReader): SerializedObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace SerializedObject {
|
||||||
|
export type AsObject = {
|
||||||
|
method: string,
|
||||||
|
definition: Uint8Array | string,
|
||||||
|
wasItRaised: boolean,
|
||||||
|
stringizedTraceback?: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PartialRunResult extends jspb.Message {
|
||||||
|
getIsComplete(): boolean;
|
||||||
|
setIsComplete(value: boolean): PartialRunResult;
|
||||||
|
clearLogsList(): void;
|
||||||
|
getLogsList(): Array<Log>;
|
||||||
|
setLogsList(value: Array<Log>): PartialRunResult;
|
||||||
|
addLogs(value?: Log, index?: number): Log;
|
||||||
|
|
||||||
|
hasResult(): boolean;
|
||||||
|
clearResult(): void;
|
||||||
|
getResult(): SerializedObject | undefined;
|
||||||
|
setResult(value?: SerializedObject): PartialRunResult;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): PartialRunResult.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: PartialRunResult): PartialRunResult.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: PartialRunResult, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): PartialRunResult;
|
||||||
|
static deserializeBinaryFromReader(message: PartialRunResult, reader: jspb.BinaryReader): PartialRunResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace PartialRunResult {
|
||||||
|
export type AsObject = {
|
||||||
|
isComplete: boolean,
|
||||||
|
logsList: Array<Log.AsObject>,
|
||||||
|
result?: SerializedObject.AsObject,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Log extends jspb.Message {
|
||||||
|
getMessage(): string;
|
||||||
|
setMessage(value: string): Log;
|
||||||
|
getSource(): LogSource;
|
||||||
|
setSource(value: LogSource): Log;
|
||||||
|
getLevel(): LogLevel;
|
||||||
|
setLevel(value: LogLevel): Log;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): Log.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: Log): Log.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: Log, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Log;
|
||||||
|
static deserializeBinaryFromReader(message: Log, reader: jspb.BinaryReader): Log;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Log {
|
||||||
|
export type AsObject = {
|
||||||
|
message: string,
|
||||||
|
source: LogSource,
|
||||||
|
level: LogLevel,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum LogSource {
|
||||||
|
BUILDER = 0,
|
||||||
|
BRIDGE = 1,
|
||||||
|
USER = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum LogLevel {
|
||||||
|
TRACE = 0,
|
||||||
|
DEBUG = 1,
|
||||||
|
INFO = 2,
|
||||||
|
WARNING = 3,
|
||||||
|
ERROR = 4,
|
||||||
|
STDOUT = 5,
|
||||||
|
STDERR = 6,
|
||||||
|
}
|
||||||
801
proto/generated/common_pb.js
Normal file
801
proto/generated/common_pb.js
Normal file
@ -0,0 +1,801 @@
|
|||||||
|
// source: common.proto
|
||||||
|
/**
|
||||||
|
* @fileoverview
|
||||||
|
* @enhanceable
|
||||||
|
* @suppress {missingRequire} reports error on implicit type usages.
|
||||||
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||||
|
* field starts with 'MSG_' and isn't a translatable message.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
var jspb = require('google-protobuf');
|
||||||
|
var goog = jspb;
|
||||||
|
var global = Function('return this')();
|
||||||
|
|
||||||
|
goog.exportSymbol('proto.Log', null, global);
|
||||||
|
goog.exportSymbol('proto.LogLevel', null, global);
|
||||||
|
goog.exportSymbol('proto.LogSource', null, global);
|
||||||
|
goog.exportSymbol('proto.PartialRunResult', null, global);
|
||||||
|
goog.exportSymbol('proto.SerializedObject', null, global);
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.SerializedObject = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.SerializedObject, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.displayName = 'proto.SerializedObject';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.PartialRunResult.repeatedFields_, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.PartialRunResult, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.displayName = 'proto.PartialRunResult';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.Log = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.Log, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.Log.displayName = 'proto.Log';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.SerializedObject.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.SerializedObject} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
method: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
|
definition: msg.getDefinition_asB64(),
|
||||||
|
wasItRaised: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
||||||
|
stringizedTraceback: jspb.Message.getFieldWithDefault(msg, 4, "")
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.SerializedObject}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.SerializedObject;
|
||||||
|
return proto.SerializedObject.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.SerializedObject} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.SerializedObject}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setMethod(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
||||||
|
msg.setDefinition(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {boolean} */ (reader.readBool());
|
||||||
|
msg.setWasItRaised(value);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setStringizedTraceback(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.SerializedObject.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.SerializedObject} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getMethod();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getDefinition_asU8();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeBytes(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getWasItRaised();
|
||||||
|
if (f) {
|
||||||
|
writer.writeBool(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeString(
|
||||||
|
4,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string method = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getMethod = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.SerializedObject} returns this
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.setMethod = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes definition = 2;
|
||||||
|
* @return {!(string|Uint8Array)}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getDefinition = function() {
|
||||||
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes definition = 2;
|
||||||
|
* This is a type-conversion wrapper around `getDefinition()`
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getDefinition_asB64 = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
||||||
|
this.getDefinition()));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes definition = 2;
|
||||||
|
* Note that Uint8Array is not supported on all browsers.
|
||||||
|
* @see http://caniuse.com/Uint8Array
|
||||||
|
* This is a type-conversion wrapper around `getDefinition()`
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getDefinition_asU8 = function() {
|
||||||
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
||||||
|
this.getDefinition()));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!(string|Uint8Array)} value
|
||||||
|
* @return {!proto.SerializedObject} returns this
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.setDefinition = function(value) {
|
||||||
|
return jspb.Message.setProto3BytesField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bool was_it_raised = 3;
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getWasItRaised = function() {
|
||||||
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean} value
|
||||||
|
* @return {!proto.SerializedObject} returns this
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.setWasItRaised = function(value) {
|
||||||
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string stringized_traceback = 4;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.getStringizedTraceback = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.SerializedObject} returns this
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.setStringizedTraceback = function(value) {
|
||||||
|
return jspb.Message.setField(this, 4, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the field making it undefined.
|
||||||
|
* @return {!proto.SerializedObject} returns this
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.clearStringizedTraceback = function() {
|
||||||
|
return jspb.Message.setField(this, 4, undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.SerializedObject.prototype.hasStringizedTraceback = function() {
|
||||||
|
return jspb.Message.getField(this, 4) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of repeated fields within this message type.
|
||||||
|
* @private {!Array<number>}
|
||||||
|
* @const
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.repeatedFields_ = [2];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.PartialRunResult.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.PartialRunResult} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
isComplete: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
||||||
|
logsList: jspb.Message.toObjectList(msg.getLogsList(),
|
||||||
|
proto.Log.toObject, includeInstance),
|
||||||
|
result: (f = msg.getResult()) && proto.SerializedObject.toObject(includeInstance, f)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.PartialRunResult}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.PartialRunResult;
|
||||||
|
return proto.PartialRunResult.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.PartialRunResult} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.PartialRunResult}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {boolean} */ (reader.readBool());
|
||||||
|
msg.setIsComplete(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = new proto.Log;
|
||||||
|
reader.readMessage(value,proto.Log.deserializeBinaryFromReader);
|
||||||
|
msg.addLogs(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = new proto.SerializedObject;
|
||||||
|
reader.readMessage(value,proto.SerializedObject.deserializeBinaryFromReader);
|
||||||
|
msg.setResult(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.PartialRunResult.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.PartialRunResult} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getIsComplete();
|
||||||
|
if (f) {
|
||||||
|
writer.writeBool(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getLogsList();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeRepeatedMessage(
|
||||||
|
2,
|
||||||
|
f,
|
||||||
|
proto.Log.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getResult();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
3,
|
||||||
|
f,
|
||||||
|
proto.SerializedObject.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bool is_complete = 1;
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.getIsComplete = function() {
|
||||||
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean} value
|
||||||
|
* @return {!proto.PartialRunResult} returns this
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.setIsComplete = function(value) {
|
||||||
|
return jspb.Message.setProto3BooleanField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* repeated Log logs = 2;
|
||||||
|
* @return {!Array<!proto.Log>}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.getLogsList = function() {
|
||||||
|
return /** @type{!Array<!proto.Log>} */ (
|
||||||
|
jspb.Message.getRepeatedWrapperField(this, proto.Log, 2));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!Array<!proto.Log>} value
|
||||||
|
* @return {!proto.PartialRunResult} returns this
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.setLogsList = function(value) {
|
||||||
|
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.Log=} opt_value
|
||||||
|
* @param {number=} opt_index
|
||||||
|
* @return {!proto.Log}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.addLogs = function(opt_value, opt_index) {
|
||||||
|
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Log, opt_index);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the list making it empty but non-null.
|
||||||
|
* @return {!proto.PartialRunResult} returns this
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.clearLogsList = function() {
|
||||||
|
return this.setLogsList([]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional SerializedObject result = 3;
|
||||||
|
* @return {?proto.SerializedObject}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.getResult = function() {
|
||||||
|
return /** @type{?proto.SerializedObject} */ (
|
||||||
|
jspb.Message.getWrapperField(this, proto.SerializedObject, 3));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?proto.SerializedObject|undefined} value
|
||||||
|
* @return {!proto.PartialRunResult} returns this
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.setResult = function(value) {
|
||||||
|
return jspb.Message.setWrapperField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the message field making it undefined.
|
||||||
|
* @return {!proto.PartialRunResult} returns this
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.clearResult = function() {
|
||||||
|
return this.setResult(undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.PartialRunResult.prototype.hasResult = function() {
|
||||||
|
return jspb.Message.getField(this, 3) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.Log.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.Log} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.Log.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
message: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
|
source: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
||||||
|
level: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.Log}
|
||||||
|
*/
|
||||||
|
proto.Log.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.Log;
|
||||||
|
return proto.Log.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.Log} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.Log}
|
||||||
|
*/
|
||||||
|
proto.Log.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setMessage(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {!proto.LogSource} */ (reader.readEnum());
|
||||||
|
msg.setSource(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {!proto.LogLevel} */ (reader.readEnum());
|
||||||
|
msg.setLevel(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.Log.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.Log} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.Log.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getMessage();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getSource();
|
||||||
|
if (f !== 0.0) {
|
||||||
|
writer.writeEnum(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getLevel();
|
||||||
|
if (f !== 0.0) {
|
||||||
|
writer.writeEnum(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string message = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.getMessage = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.Log} returns this
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.setMessage = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional LogSource source = 2;
|
||||||
|
* @return {!proto.LogSource}
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.getSource = function() {
|
||||||
|
return /** @type {!proto.LogSource} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.LogSource} value
|
||||||
|
* @return {!proto.Log} returns this
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.setSource = function(value) {
|
||||||
|
return jspb.Message.setProto3EnumField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional LogLevel level = 3;
|
||||||
|
* @return {!proto.LogLevel}
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.getLevel = function() {
|
||||||
|
return /** @type {!proto.LogLevel} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.LogLevel} value
|
||||||
|
* @return {!proto.Log} returns this
|
||||||
|
*/
|
||||||
|
proto.Log.prototype.setLevel = function(value) {
|
||||||
|
return jspb.Message.setProto3EnumField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
proto.LogSource = {
|
||||||
|
BUILDER: 0,
|
||||||
|
BRIDGE: 1,
|
||||||
|
USER: 2
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
proto.LogLevel = {
|
||||||
|
TRACE: 0,
|
||||||
|
DEBUG: 1,
|
||||||
|
INFO: 2,
|
||||||
|
WARNING: 3,
|
||||||
|
ERROR: 4,
|
||||||
|
STDOUT: 5,
|
||||||
|
STDERR: 6
|
||||||
|
};
|
||||||
|
|
||||||
|
goog.object.extend(exports, proto);
|
||||||
193
proto/generated/controller_grpc_pb.d.ts
vendored
Normal file
193
proto/generated/controller_grpc_pb.d.ts
vendored
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
// package: controller
|
||||||
|
// file: controller.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import * as controller_pb from "./controller_pb";
|
||||||
|
import * as common_pb from "./common_pb";
|
||||||
|
import * as server_pb from "./server_pb";
|
||||||
|
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
|
||||||
|
|
||||||
|
interface IIsolateControllerService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
run: IIsolateControllerService_IRun;
|
||||||
|
map: IIsolateControllerService_IMap;
|
||||||
|
schedule: IIsolateControllerService_ISchedule;
|
||||||
|
listScheduledRuns: IIsolateControllerService_IListScheduledRuns;
|
||||||
|
cancelScheduledRun: IIsolateControllerService_ICancelScheduledRun;
|
||||||
|
listScheduledRunActivations: IIsolateControllerService_IListScheduledRunActivations;
|
||||||
|
getScheduledActivationLogs: IIsolateControllerService_IGetScheduledActivationLogs;
|
||||||
|
createUserKey: IIsolateControllerService_ICreateUserKey;
|
||||||
|
listUserKeys: IIsolateControllerService_IListUserKeys;
|
||||||
|
revokeUserKey: IIsolateControllerService_IRevokeUserKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IIsolateControllerService_IRun extends grpc.MethodDefinition<controller_pb.HostedRun, controller_pb.HostedRunResult> {
|
||||||
|
path: "/controller.IsolateController/Run";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: true;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.HostedRun>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.HostedRun>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.HostedRunResult>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.HostedRunResult>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IMap extends grpc.MethodDefinition<controller_pb.HostedMap, controller_pb.HostedRunResult> {
|
||||||
|
path: "/controller.IsolateController/Map";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: true;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.HostedMap>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.HostedMap>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.HostedRunResult>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.HostedRunResult>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_ISchedule extends grpc.MethodDefinition<controller_pb.HostedRunCron, controller_pb.ScheduleInfo> {
|
||||||
|
path: "/controller.IsolateController/Schedule";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.HostedRunCron>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.HostedRunCron>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.ScheduleInfo>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.ScheduleInfo>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IListScheduledRuns extends grpc.MethodDefinition<controller_pb.ListScheduledRunsRequest, controller_pb.ListScheduledRunsResponse> {
|
||||||
|
path: "/controller.IsolateController/ListScheduledRuns";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.ListScheduledRunsRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.ListScheduledRunsRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.ListScheduledRunsResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.ListScheduledRunsResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_ICancelScheduledRun extends grpc.MethodDefinition<controller_pb.CancelScheduledRunRequest, controller_pb.CancelScheduledRunResponse> {
|
||||||
|
path: "/controller.IsolateController/CancelScheduledRun";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.CancelScheduledRunRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.CancelScheduledRunRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.CancelScheduledRunResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.CancelScheduledRunResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IListScheduledRunActivations extends grpc.MethodDefinition<controller_pb.ListScheduledRunActivationsRequest, controller_pb.ListScheduledRunActivationsResponse> {
|
||||||
|
path: "/controller.IsolateController/ListScheduledRunActivations";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.ListScheduledRunActivationsRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.ListScheduledRunActivationsRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.ListScheduledRunActivationsResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.ListScheduledRunActivationsResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IGetScheduledActivationLogs extends grpc.MethodDefinition<controller_pb.GetScheduledActivationLogsRequest, controller_pb.GetScheduledActivationLogsResponse> {
|
||||||
|
path: "/controller.IsolateController/GetScheduledActivationLogs";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.GetScheduledActivationLogsRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.GetScheduledActivationLogsRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.GetScheduledActivationLogsResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.GetScheduledActivationLogsResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_ICreateUserKey extends grpc.MethodDefinition<controller_pb.CreateUserKeyRequest, controller_pb.CreateUserKeyResponse> {
|
||||||
|
path: "/controller.IsolateController/CreateUserKey";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.CreateUserKeyRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.CreateUserKeyRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.CreateUserKeyResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.CreateUserKeyResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IListUserKeys extends grpc.MethodDefinition<controller_pb.ListUserKeysRequest, controller_pb.ListUserKeysResponse> {
|
||||||
|
path: "/controller.IsolateController/ListUserKeys";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.ListUserKeysRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.ListUserKeysRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.ListUserKeysResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.ListUserKeysResponse>;
|
||||||
|
}
|
||||||
|
interface IIsolateControllerService_IRevokeUserKey extends grpc.MethodDefinition<controller_pb.RevokeUserKeyRequest, controller_pb.RevokeUserKeyResponse> {
|
||||||
|
path: "/controller.IsolateController/RevokeUserKey";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: false;
|
||||||
|
requestSerialize: grpc.serialize<controller_pb.RevokeUserKeyRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<controller_pb.RevokeUserKeyRequest>;
|
||||||
|
responseSerialize: grpc.serialize<controller_pb.RevokeUserKeyResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<controller_pb.RevokeUserKeyResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const IsolateControllerService: IIsolateControllerService;
|
||||||
|
|
||||||
|
export interface IIsolateControllerServer extends grpc.UntypedServiceImplementation {
|
||||||
|
run: grpc.handleServerStreamingCall<controller_pb.HostedRun, controller_pb.HostedRunResult>;
|
||||||
|
map: grpc.handleServerStreamingCall<controller_pb.HostedMap, controller_pb.HostedRunResult>;
|
||||||
|
schedule: grpc.handleUnaryCall<controller_pb.HostedRunCron, controller_pb.ScheduleInfo>;
|
||||||
|
listScheduledRuns: grpc.handleUnaryCall<controller_pb.ListScheduledRunsRequest, controller_pb.ListScheduledRunsResponse>;
|
||||||
|
cancelScheduledRun: grpc.handleUnaryCall<controller_pb.CancelScheduledRunRequest, controller_pb.CancelScheduledRunResponse>;
|
||||||
|
listScheduledRunActivations: grpc.handleUnaryCall<controller_pb.ListScheduledRunActivationsRequest, controller_pb.ListScheduledRunActivationsResponse>;
|
||||||
|
getScheduledActivationLogs: grpc.handleUnaryCall<controller_pb.GetScheduledActivationLogsRequest, controller_pb.GetScheduledActivationLogsResponse>;
|
||||||
|
createUserKey: grpc.handleUnaryCall<controller_pb.CreateUserKeyRequest, controller_pb.CreateUserKeyResponse>;
|
||||||
|
listUserKeys: grpc.handleUnaryCall<controller_pb.ListUserKeysRequest, controller_pb.ListUserKeysResponse>;
|
||||||
|
revokeUserKey: grpc.handleUnaryCall<controller_pb.RevokeUserKeyRequest, controller_pb.RevokeUserKeyResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IIsolateControllerClient {
|
||||||
|
run(request: controller_pb.HostedRun, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
run(request: controller_pb.HostedRun, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
map(request: controller_pb.HostedMap, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
map(request: controller_pb.HostedMap, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
schedule(request: controller_pb.HostedRunCron, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
schedule(request: controller_pb.HostedRunCron, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
schedule(request: controller_pb.HostedRunCron, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
createUserKey(request: controller_pb.CreateUserKeyRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
createUserKey(request: controller_pb.CreateUserKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
createUserKey(request: controller_pb.CreateUserKeyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listUserKeys(request: controller_pb.ListUserKeysRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listUserKeys(request: controller_pb.ListUserKeysRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
listUserKeys(request: controller_pb.ListUserKeysRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
revokeUserKey(request: controller_pb.RevokeUserKeyRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
revokeUserKey(request: controller_pb.RevokeUserKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
revokeUserKey(request: controller_pb.RevokeUserKeyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class IsolateControllerClient extends grpc.Client implements IIsolateControllerClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
|
||||||
|
public run(request: controller_pb.HostedRun, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
public run(request: controller_pb.HostedRun, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
public map(request: controller_pb.HostedMap, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
public map(request: controller_pb.HostedMap, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<controller_pb.HostedRunResult>;
|
||||||
|
public schedule(request: controller_pb.HostedRunCron, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
public schedule(request: controller_pb.HostedRunCron, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
public schedule(request: controller_pb.HostedRunCron, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ScheduleInfo) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRuns(request: controller_pb.ListScheduledRunsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public cancelScheduledRun(request: controller_pb.CancelScheduledRunRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.CancelScheduledRunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listScheduledRunActivations(request: controller_pb.ListScheduledRunActivationsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListScheduledRunActivationsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public getScheduledActivationLogs(request: controller_pb.GetScheduledActivationLogsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.GetScheduledActivationLogsResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public createUserKey(request: controller_pb.CreateUserKeyRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public createUserKey(request: controller_pb.CreateUserKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public createUserKey(request: controller_pb.CreateUserKeyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.CreateUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listUserKeys(request: controller_pb.ListUserKeysRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listUserKeys(request: controller_pb.ListUserKeysRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public listUserKeys(request: controller_pb.ListUserKeysRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.ListUserKeysResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public revokeUserKey(request: controller_pb.RevokeUserKeyRequest, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public revokeUserKey(request: controller_pb.RevokeUserKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public revokeUserKey(request: controller_pb.RevokeUserKeyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: controller_pb.RevokeUserKeyResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
||||||
344
proto/generated/controller_grpc_pb.js
Normal file
344
proto/generated/controller_grpc_pb.js
Normal file
@ -0,0 +1,344 @@
|
|||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
var grpc = require("@grpc/grpc-js");
|
||||||
|
var controller_pb = require('./controller_pb.js');
|
||||||
|
var common_pb = require('./common_pb.js');
|
||||||
|
var server_pb = require('./server_pb.js');
|
||||||
|
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
|
||||||
|
|
||||||
|
function serialize_controller_CancelScheduledRunRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.CancelScheduledRunRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.CancelScheduledRunRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_CancelScheduledRunRequest(buffer_arg) {
|
||||||
|
return controller_pb.CancelScheduledRunRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_CancelScheduledRunResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.CancelScheduledRunResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.CancelScheduledRunResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_CancelScheduledRunResponse(buffer_arg) {
|
||||||
|
return controller_pb.CancelScheduledRunResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_CreateUserKeyRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.CreateUserKeyRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.CreateUserKeyRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_CreateUserKeyRequest(buffer_arg) {
|
||||||
|
return controller_pb.CreateUserKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_CreateUserKeyResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.CreateUserKeyResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.CreateUserKeyResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_CreateUserKeyResponse(buffer_arg) {
|
||||||
|
return controller_pb.CreateUserKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_GetScheduledActivationLogsRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.GetScheduledActivationLogsRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.GetScheduledActivationLogsRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_GetScheduledActivationLogsRequest(buffer_arg) {
|
||||||
|
return controller_pb.GetScheduledActivationLogsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_GetScheduledActivationLogsResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.GetScheduledActivationLogsResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.GetScheduledActivationLogsResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_GetScheduledActivationLogsResponse(buffer_arg) {
|
||||||
|
return controller_pb.GetScheduledActivationLogsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_HostedMap(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.HostedMap)) {
|
||||||
|
throw new Error('Expected argument of type controller.HostedMap');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_HostedMap(buffer_arg) {
|
||||||
|
return controller_pb.HostedMap.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_HostedRun(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.HostedRun)) {
|
||||||
|
throw new Error('Expected argument of type controller.HostedRun');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_HostedRun(buffer_arg) {
|
||||||
|
return controller_pb.HostedRun.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_HostedRunCron(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.HostedRunCron)) {
|
||||||
|
throw new Error('Expected argument of type controller.HostedRunCron');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_HostedRunCron(buffer_arg) {
|
||||||
|
return controller_pb.HostedRunCron.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_HostedRunResult(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.HostedRunResult)) {
|
||||||
|
throw new Error('Expected argument of type controller.HostedRunResult');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_HostedRunResult(buffer_arg) {
|
||||||
|
return controller_pb.HostedRunResult.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListScheduledRunActivationsRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListScheduledRunActivationsRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListScheduledRunActivationsRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListScheduledRunActivationsRequest(buffer_arg) {
|
||||||
|
return controller_pb.ListScheduledRunActivationsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListScheduledRunActivationsResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListScheduledRunActivationsResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListScheduledRunActivationsResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListScheduledRunActivationsResponse(buffer_arg) {
|
||||||
|
return controller_pb.ListScheduledRunActivationsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListScheduledRunsRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListScheduledRunsRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListScheduledRunsRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListScheduledRunsRequest(buffer_arg) {
|
||||||
|
return controller_pb.ListScheduledRunsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListScheduledRunsResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListScheduledRunsResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListScheduledRunsResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListScheduledRunsResponse(buffer_arg) {
|
||||||
|
return controller_pb.ListScheduledRunsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListUserKeysRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListUserKeysRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListUserKeysRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListUserKeysRequest(buffer_arg) {
|
||||||
|
return controller_pb.ListUserKeysRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ListUserKeysResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ListUserKeysResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.ListUserKeysResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ListUserKeysResponse(buffer_arg) {
|
||||||
|
return controller_pb.ListUserKeysResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_RevokeUserKeyRequest(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.RevokeUserKeyRequest)) {
|
||||||
|
throw new Error('Expected argument of type controller.RevokeUserKeyRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_RevokeUserKeyRequest(buffer_arg) {
|
||||||
|
return controller_pb.RevokeUserKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_RevokeUserKeyResponse(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.RevokeUserKeyResponse)) {
|
||||||
|
throw new Error('Expected argument of type controller.RevokeUserKeyResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_RevokeUserKeyResponse(buffer_arg) {
|
||||||
|
return controller_pb.RevokeUserKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_controller_ScheduleInfo(arg) {
|
||||||
|
if (!(arg instanceof controller_pb.ScheduleInfo)) {
|
||||||
|
throw new Error('Expected argument of type controller.ScheduleInfo');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_controller_ScheduleInfo(buffer_arg) {
|
||||||
|
return controller_pb.ScheduleInfo.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var IsolateControllerService = exports.IsolateControllerService = {
|
||||||
|
// Run the given function on the specified environment. Streams logs
|
||||||
|
// and the result originating from that function.
|
||||||
|
run: {
|
||||||
|
path: '/controller.IsolateController/Run',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: controller_pb.HostedRun,
|
||||||
|
responseType: controller_pb.HostedRunResult,
|
||||||
|
requestSerialize: serialize_controller_HostedRun,
|
||||||
|
requestDeserialize: deserialize_controller_HostedRun,
|
||||||
|
responseSerialize: serialize_controller_HostedRunResult,
|
||||||
|
responseDeserialize: deserialize_controller_HostedRunResult,
|
||||||
|
},
|
||||||
|
// Run the given function in parallel with the given inputs
|
||||||
|
map: {
|
||||||
|
path: '/controller.IsolateController/Map',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: controller_pb.HostedMap,
|
||||||
|
responseType: controller_pb.HostedRunResult,
|
||||||
|
requestSerialize: serialize_controller_HostedMap,
|
||||||
|
requestDeserialize: deserialize_controller_HostedMap,
|
||||||
|
responseSerialize: serialize_controller_HostedRunResult,
|
||||||
|
responseDeserialize: deserialize_controller_HostedRunResult,
|
||||||
|
},
|
||||||
|
// Schedule the given function to be run with the specified cron.
|
||||||
|
schedule: {
|
||||||
|
path: '/controller.IsolateController/Schedule',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.HostedRunCron,
|
||||||
|
responseType: controller_pb.ScheduleInfo,
|
||||||
|
requestSerialize: serialize_controller_HostedRunCron,
|
||||||
|
requestDeserialize: deserialize_controller_HostedRunCron,
|
||||||
|
responseSerialize: serialize_controller_ScheduleInfo,
|
||||||
|
responseDeserialize: deserialize_controller_ScheduleInfo,
|
||||||
|
},
|
||||||
|
// List scheduled runs.
|
||||||
|
listScheduledRuns: {
|
||||||
|
path: '/controller.IsolateController/ListScheduledRuns',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.ListScheduledRunsRequest,
|
||||||
|
responseType: controller_pb.ListScheduledRunsResponse,
|
||||||
|
requestSerialize: serialize_controller_ListScheduledRunsRequest,
|
||||||
|
requestDeserialize: deserialize_controller_ListScheduledRunsRequest,
|
||||||
|
responseSerialize: serialize_controller_ListScheduledRunsResponse,
|
||||||
|
responseDeserialize: deserialize_controller_ListScheduledRunsResponse,
|
||||||
|
},
|
||||||
|
// Cancel a scheduled run.
|
||||||
|
cancelScheduledRun: {
|
||||||
|
path: '/controller.IsolateController/CancelScheduledRun',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.CancelScheduledRunRequest,
|
||||||
|
responseType: controller_pb.CancelScheduledRunResponse,
|
||||||
|
requestSerialize: serialize_controller_CancelScheduledRunRequest,
|
||||||
|
requestDeserialize: deserialize_controller_CancelScheduledRunRequest,
|
||||||
|
responseSerialize: serialize_controller_CancelScheduledRunResponse,
|
||||||
|
responseDeserialize: deserialize_controller_CancelScheduledRunResponse,
|
||||||
|
},
|
||||||
|
// List all the activations of one scheduled run.
|
||||||
|
listScheduledRunActivations: {
|
||||||
|
path: '/controller.IsolateController/ListScheduledRunActivations',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.ListScheduledRunActivationsRequest,
|
||||||
|
responseType: controller_pb.ListScheduledRunActivationsResponse,
|
||||||
|
requestSerialize: serialize_controller_ListScheduledRunActivationsRequest,
|
||||||
|
requestDeserialize: deserialize_controller_ListScheduledRunActivationsRequest,
|
||||||
|
responseSerialize: serialize_controller_ListScheduledRunActivationsResponse,
|
||||||
|
responseDeserialize: deserialize_controller_ListScheduledRunActivationsResponse,
|
||||||
|
},
|
||||||
|
// Get logs from a particular activation of a scheduled run.
|
||||||
|
getScheduledActivationLogs: {
|
||||||
|
path: '/controller.IsolateController/GetScheduledActivationLogs',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.GetScheduledActivationLogsRequest,
|
||||||
|
responseType: controller_pb.GetScheduledActivationLogsResponse,
|
||||||
|
requestSerialize: serialize_controller_GetScheduledActivationLogsRequest,
|
||||||
|
requestDeserialize: deserialize_controller_GetScheduledActivationLogsRequest,
|
||||||
|
responseSerialize: serialize_controller_GetScheduledActivationLogsResponse,
|
||||||
|
responseDeserialize: deserialize_controller_GetScheduledActivationLogsResponse,
|
||||||
|
},
|
||||||
|
// Creates an authentication key for a user
|
||||||
|
createUserKey: {
|
||||||
|
path: '/controller.IsolateController/CreateUserKey',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.CreateUserKeyRequest,
|
||||||
|
responseType: controller_pb.CreateUserKeyResponse,
|
||||||
|
requestSerialize: serialize_controller_CreateUserKeyRequest,
|
||||||
|
requestDeserialize: deserialize_controller_CreateUserKeyRequest,
|
||||||
|
responseSerialize: serialize_controller_CreateUserKeyResponse,
|
||||||
|
responseDeserialize: deserialize_controller_CreateUserKeyResponse,
|
||||||
|
},
|
||||||
|
// Lists the user's authentication keys
|
||||||
|
listUserKeys: {
|
||||||
|
path: '/controller.IsolateController/ListUserKeys',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.ListUserKeysRequest,
|
||||||
|
responseType: controller_pb.ListUserKeysResponse,
|
||||||
|
requestSerialize: serialize_controller_ListUserKeysRequest,
|
||||||
|
requestDeserialize: deserialize_controller_ListUserKeysRequest,
|
||||||
|
responseSerialize: serialize_controller_ListUserKeysResponse,
|
||||||
|
responseDeserialize: deserialize_controller_ListUserKeysResponse,
|
||||||
|
},
|
||||||
|
// Revokes an authentication key for a user
|
||||||
|
revokeUserKey: {
|
||||||
|
path: '/controller.IsolateController/RevokeUserKey',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: controller_pb.RevokeUserKeyRequest,
|
||||||
|
responseType: controller_pb.RevokeUserKeyResponse,
|
||||||
|
requestSerialize: serialize_controller_RevokeUserKeyRequest,
|
||||||
|
requestDeserialize: deserialize_controller_RevokeUserKeyRequest,
|
||||||
|
responseSerialize: serialize_controller_RevokeUserKeyResponse,
|
||||||
|
responseDeserialize: deserialize_controller_RevokeUserKeyResponse,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.IsolateControllerClient = grpc.makeGenericClientConstructor(IsolateControllerService);
|
||||||
560
proto/generated/controller_pb.d.ts
vendored
Normal file
560
proto/generated/controller_pb.d.ts
vendored
Normal file
@ -0,0 +1,560 @@
|
|||||||
|
// package: controller
|
||||||
|
// file: controller.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
import * as common_pb from "./common_pb";
|
||||||
|
import * as server_pb from "./server_pb";
|
||||||
|
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
|
||||||
|
|
||||||
|
export class HostedMap extends jspb.Message {
|
||||||
|
clearEnvironmentsList(): void;
|
||||||
|
getEnvironmentsList(): Array<server_pb.EnvironmentDefinition>;
|
||||||
|
setEnvironmentsList(value: Array<server_pb.EnvironmentDefinition>): HostedMap;
|
||||||
|
addEnvironments(value?: server_pb.EnvironmentDefinition, index?: number): server_pb.EnvironmentDefinition;
|
||||||
|
|
||||||
|
hasMachineRequirements(): boolean;
|
||||||
|
clearMachineRequirements(): void;
|
||||||
|
getMachineRequirements(): MachineRequirements | undefined;
|
||||||
|
setMachineRequirements(value?: MachineRequirements): HostedMap;
|
||||||
|
|
||||||
|
hasFunction(): boolean;
|
||||||
|
clearFunction(): void;
|
||||||
|
getFunction(): common_pb.SerializedObject | undefined;
|
||||||
|
setFunction(value?: common_pb.SerializedObject): HostedMap;
|
||||||
|
clearInputsList(): void;
|
||||||
|
getInputsList(): Array<common_pb.SerializedObject>;
|
||||||
|
setInputsList(value: Array<common_pb.SerializedObject>): HostedMap;
|
||||||
|
addInputs(value?: common_pb.SerializedObject, index?: number): common_pb.SerializedObject;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): HostedMap.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: HostedMap): HostedMap.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: HostedMap, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): HostedMap;
|
||||||
|
static deserializeBinaryFromReader(message: HostedMap, reader: jspb.BinaryReader): HostedMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace HostedMap {
|
||||||
|
export type AsObject = {
|
||||||
|
environmentsList: Array<server_pb.EnvironmentDefinition.AsObject>,
|
||||||
|
machineRequirements?: MachineRequirements.AsObject,
|
||||||
|
pb_function?: common_pb.SerializedObject.AsObject,
|
||||||
|
inputsList: Array<common_pb.SerializedObject.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class HostedRun extends jspb.Message {
|
||||||
|
clearEnvironmentsList(): void;
|
||||||
|
getEnvironmentsList(): Array<server_pb.EnvironmentDefinition>;
|
||||||
|
setEnvironmentsList(value: Array<server_pb.EnvironmentDefinition>): HostedRun;
|
||||||
|
addEnvironments(value?: server_pb.EnvironmentDefinition, index?: number): server_pb.EnvironmentDefinition;
|
||||||
|
|
||||||
|
hasMachineRequirements(): boolean;
|
||||||
|
clearMachineRequirements(): void;
|
||||||
|
getMachineRequirements(): MachineRequirements | undefined;
|
||||||
|
setMachineRequirements(value?: MachineRequirements): HostedRun;
|
||||||
|
|
||||||
|
hasFunction(): boolean;
|
||||||
|
clearFunction(): void;
|
||||||
|
getFunction(): common_pb.SerializedObject | undefined;
|
||||||
|
setFunction(value?: common_pb.SerializedObject): HostedRun;
|
||||||
|
|
||||||
|
hasSetupFunc(): boolean;
|
||||||
|
clearSetupFunc(): void;
|
||||||
|
getSetupFunc(): common_pb.SerializedObject | undefined;
|
||||||
|
setSetupFunc(value?: common_pb.SerializedObject): HostedRun;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): HostedRun.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: HostedRun): HostedRun.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: HostedRun, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): HostedRun;
|
||||||
|
static deserializeBinaryFromReader(message: HostedRun, reader: jspb.BinaryReader): HostedRun;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace HostedRun {
|
||||||
|
export type AsObject = {
|
||||||
|
environmentsList: Array<server_pb.EnvironmentDefinition.AsObject>,
|
||||||
|
machineRequirements?: MachineRequirements.AsObject,
|
||||||
|
pb_function?: common_pb.SerializedObject.AsObject,
|
||||||
|
setupFunc?: common_pb.SerializedObject.AsObject,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class HostedRunCron extends jspb.Message {
|
||||||
|
clearEnvironmentsList(): void;
|
||||||
|
getEnvironmentsList(): Array<server_pb.EnvironmentDefinition>;
|
||||||
|
setEnvironmentsList(value: Array<server_pb.EnvironmentDefinition>): HostedRunCron;
|
||||||
|
addEnvironments(value?: server_pb.EnvironmentDefinition, index?: number): server_pb.EnvironmentDefinition;
|
||||||
|
|
||||||
|
hasMachineRequirements(): boolean;
|
||||||
|
clearMachineRequirements(): void;
|
||||||
|
getMachineRequirements(): MachineRequirements | undefined;
|
||||||
|
setMachineRequirements(value?: MachineRequirements): HostedRunCron;
|
||||||
|
|
||||||
|
hasFunction(): boolean;
|
||||||
|
clearFunction(): void;
|
||||||
|
getFunction(): common_pb.SerializedObject | undefined;
|
||||||
|
setFunction(value?: common_pb.SerializedObject): HostedRunCron;
|
||||||
|
getCron(): string;
|
||||||
|
setCron(value: string): HostedRunCron;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): HostedRunCron.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: HostedRunCron): HostedRunCron.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: HostedRunCron, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): HostedRunCron;
|
||||||
|
static deserializeBinaryFromReader(message: HostedRunCron, reader: jspb.BinaryReader): HostedRunCron;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace HostedRunCron {
|
||||||
|
export type AsObject = {
|
||||||
|
environmentsList: Array<server_pb.EnvironmentDefinition.AsObject>,
|
||||||
|
machineRequirements?: MachineRequirements.AsObject,
|
||||||
|
pb_function?: common_pb.SerializedObject.AsObject,
|
||||||
|
cron: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CancelScheduledRunRequest extends jspb.Message {
|
||||||
|
getRunId(): string;
|
||||||
|
setRunId(value: string): CancelScheduledRunRequest;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): CancelScheduledRunRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: CancelScheduledRunRequest): CancelScheduledRunRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: CancelScheduledRunRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CancelScheduledRunRequest;
|
||||||
|
static deserializeBinaryFromReader(message: CancelScheduledRunRequest, reader: jspb.BinaryReader): CancelScheduledRunRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace CancelScheduledRunRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
runId: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CancelScheduledRunResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): CancelScheduledRunResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: CancelScheduledRunResponse): CancelScheduledRunResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: CancelScheduledRunResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CancelScheduledRunResponse;
|
||||||
|
static deserializeBinaryFromReader(message: CancelScheduledRunResponse, reader: jspb.BinaryReader): CancelScheduledRunResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace CancelScheduledRunResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListScheduledRunsRequest extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListScheduledRunsRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListScheduledRunsRequest): ListScheduledRunsRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListScheduledRunsRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListScheduledRunsRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ListScheduledRunsRequest, reader: jspb.BinaryReader): ListScheduledRunsRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListScheduledRunsRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListScheduledRunActivationsRequest extends jspb.Message {
|
||||||
|
getRunId(): string;
|
||||||
|
setRunId(value: string): ListScheduledRunActivationsRequest;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListScheduledRunActivationsRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListScheduledRunActivationsRequest): ListScheduledRunActivationsRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListScheduledRunActivationsRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListScheduledRunActivationsRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ListScheduledRunActivationsRequest, reader: jspb.BinaryReader): ListScheduledRunActivationsRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListScheduledRunActivationsRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
runId: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListScheduledRunActivationsResponse extends jspb.Message {
|
||||||
|
clearActivationIdsList(): void;
|
||||||
|
getActivationIdsList(): Array<string>;
|
||||||
|
setActivationIdsList(value: Array<string>): ListScheduledRunActivationsResponse;
|
||||||
|
addActivationIds(value: string, index?: number): string;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListScheduledRunActivationsResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListScheduledRunActivationsResponse): ListScheduledRunActivationsResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListScheduledRunActivationsResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListScheduledRunActivationsResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ListScheduledRunActivationsResponse, reader: jspb.BinaryReader): ListScheduledRunActivationsResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListScheduledRunActivationsResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
activationIdsList: Array<string>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListScheduledRunsResponse extends jspb.Message {
|
||||||
|
clearScheduledRunsList(): void;
|
||||||
|
getScheduledRunsList(): Array<ScheduleInfo>;
|
||||||
|
setScheduledRunsList(value: Array<ScheduleInfo>): ListScheduledRunsResponse;
|
||||||
|
addScheduledRuns(value?: ScheduleInfo, index?: number): ScheduleInfo;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListScheduledRunsResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListScheduledRunsResponse): ListScheduledRunsResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListScheduledRunsResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListScheduledRunsResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ListScheduledRunsResponse, reader: jspb.BinaryReader): ListScheduledRunsResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListScheduledRunsResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
scheduledRunsList: Array<ScheduleInfo.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GetScheduledActivationLogsRequest extends jspb.Message {
|
||||||
|
getRunId(): string;
|
||||||
|
setRunId(value: string): GetScheduledActivationLogsRequest;
|
||||||
|
getActivationId(): string;
|
||||||
|
setActivationId(value: string): GetScheduledActivationLogsRequest;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): GetScheduledActivationLogsRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: GetScheduledActivationLogsRequest): GetScheduledActivationLogsRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: GetScheduledActivationLogsRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): GetScheduledActivationLogsRequest;
|
||||||
|
static deserializeBinaryFromReader(message: GetScheduledActivationLogsRequest, reader: jspb.BinaryReader): GetScheduledActivationLogsRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace GetScheduledActivationLogsRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
runId: string,
|
||||||
|
activationId: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GetScheduledActivationLogsResponse extends jspb.Message {
|
||||||
|
getRawLogs(): Uint8Array | string;
|
||||||
|
getRawLogs_asU8(): Uint8Array;
|
||||||
|
getRawLogs_asB64(): string;
|
||||||
|
setRawLogs(value: Uint8Array | string): GetScheduledActivationLogsResponse;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): GetScheduledActivationLogsResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: GetScheduledActivationLogsResponse): GetScheduledActivationLogsResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: GetScheduledActivationLogsResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): GetScheduledActivationLogsResponse;
|
||||||
|
static deserializeBinaryFromReader(message: GetScheduledActivationLogsResponse, reader: jspb.BinaryReader): GetScheduledActivationLogsResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace GetScheduledActivationLogsResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
rawLogs: Uint8Array | string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CreateUserKeyRequest extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): CreateUserKeyRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: CreateUserKeyRequest): CreateUserKeyRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: CreateUserKeyRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CreateUserKeyRequest;
|
||||||
|
static deserializeBinaryFromReader(message: CreateUserKeyRequest, reader: jspb.BinaryReader): CreateUserKeyRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace CreateUserKeyRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CreateUserKeyResponse extends jspb.Message {
|
||||||
|
getKeySecret(): string;
|
||||||
|
setKeySecret(value: string): CreateUserKeyResponse;
|
||||||
|
getKeyId(): string;
|
||||||
|
setKeyId(value: string): CreateUserKeyResponse;
|
||||||
|
|
||||||
|
hasDescription(): boolean;
|
||||||
|
clearDescription(): void;
|
||||||
|
getDescription(): string | undefined;
|
||||||
|
setDescription(value: string): CreateUserKeyResponse;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): CreateUserKeyResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: CreateUserKeyResponse): CreateUserKeyResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: CreateUserKeyResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CreateUserKeyResponse;
|
||||||
|
static deserializeBinaryFromReader(message: CreateUserKeyResponse, reader: jspb.BinaryReader): CreateUserKeyResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace CreateUserKeyResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
keySecret: string,
|
||||||
|
keyId: string,
|
||||||
|
description?: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListUserKeysRequest extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListUserKeysRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListUserKeysRequest): ListUserKeysRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListUserKeysRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListUserKeysRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ListUserKeysRequest, reader: jspb.BinaryReader): ListUserKeysRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListUserKeysRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListUserKeysResponse extends jspb.Message {
|
||||||
|
clearUserKeysList(): void;
|
||||||
|
getUserKeysList(): Array<UserKeyInfo>;
|
||||||
|
setUserKeysList(value: Array<UserKeyInfo>): ListUserKeysResponse;
|
||||||
|
addUserKeys(value?: UserKeyInfo, index?: number): UserKeyInfo;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListUserKeysResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListUserKeysResponse): ListUserKeysResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListUserKeysResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListUserKeysResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ListUserKeysResponse, reader: jspb.BinaryReader): ListUserKeysResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListUserKeysResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
userKeysList: Array<UserKeyInfo.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class RevokeUserKeyRequest extends jspb.Message {
|
||||||
|
getKeyId(): string;
|
||||||
|
setKeyId(value: string): RevokeUserKeyRequest;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): RevokeUserKeyRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: RevokeUserKeyRequest): RevokeUserKeyRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: RevokeUserKeyRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): RevokeUserKeyRequest;
|
||||||
|
static deserializeBinaryFromReader(message: RevokeUserKeyRequest, reader: jspb.BinaryReader): RevokeUserKeyRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace RevokeUserKeyRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
keyId: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class RevokeUserKeyResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): RevokeUserKeyResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: RevokeUserKeyResponse): RevokeUserKeyResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: RevokeUserKeyResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): RevokeUserKeyResponse;
|
||||||
|
static deserializeBinaryFromReader(message: RevokeUserKeyResponse, reader: jspb.BinaryReader): RevokeUserKeyResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace RevokeUserKeyResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UserKeyInfo extends jspb.Message {
|
||||||
|
getKeyId(): string;
|
||||||
|
setKeyId(value: string): UserKeyInfo;
|
||||||
|
|
||||||
|
hasCreatedAt(): boolean;
|
||||||
|
clearCreatedAt(): void;
|
||||||
|
getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
||||||
|
setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UserKeyInfo;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): UserKeyInfo.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: UserKeyInfo): UserKeyInfo.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: UserKeyInfo, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): UserKeyInfo;
|
||||||
|
static deserializeBinaryFromReader(message: UserKeyInfo, reader: jspb.BinaryReader): UserKeyInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace UserKeyInfo {
|
||||||
|
export type AsObject = {
|
||||||
|
keyId: string,
|
||||||
|
createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ScheduleInfo extends jspb.Message {
|
||||||
|
getRunId(): string;
|
||||||
|
setRunId(value: string): ScheduleInfo;
|
||||||
|
getState(): ScheduleInfo.State;
|
||||||
|
setState(value: ScheduleInfo.State): ScheduleInfo;
|
||||||
|
getCron(): string;
|
||||||
|
setCron(value: string): ScheduleInfo;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ScheduleInfo.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ScheduleInfo): ScheduleInfo.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ScheduleInfo, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ScheduleInfo;
|
||||||
|
static deserializeBinaryFromReader(message: ScheduleInfo, reader: jspb.BinaryReader): ScheduleInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ScheduleInfo {
|
||||||
|
export type AsObject = {
|
||||||
|
runId: string,
|
||||||
|
state: ScheduleInfo.State,
|
||||||
|
cron: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum State {
|
||||||
|
SCHEDULED = 0,
|
||||||
|
INTERNAL_FAILURE = 1,
|
||||||
|
CANCELLED = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class HostedRunResult extends jspb.Message {
|
||||||
|
getRunId(): string;
|
||||||
|
setRunId(value: string): HostedRunResult;
|
||||||
|
|
||||||
|
hasStatus(): boolean;
|
||||||
|
clearStatus(): void;
|
||||||
|
getStatus(): HostedRunStatus | undefined;
|
||||||
|
setStatus(value?: HostedRunStatus): HostedRunResult;
|
||||||
|
clearLogsList(): void;
|
||||||
|
getLogsList(): Array<common_pb.Log>;
|
||||||
|
setLogsList(value: Array<common_pb.Log>): HostedRunResult;
|
||||||
|
addLogs(value?: common_pb.Log, index?: number): common_pb.Log;
|
||||||
|
|
||||||
|
hasReturnValue(): boolean;
|
||||||
|
clearReturnValue(): void;
|
||||||
|
getReturnValue(): common_pb.SerializedObject | undefined;
|
||||||
|
setReturnValue(value?: common_pb.SerializedObject): HostedRunResult;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): HostedRunResult.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: HostedRunResult): HostedRunResult.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: HostedRunResult, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): HostedRunResult;
|
||||||
|
static deserializeBinaryFromReader(message: HostedRunResult, reader: jspb.BinaryReader): HostedRunResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace HostedRunResult {
|
||||||
|
export type AsObject = {
|
||||||
|
runId: string,
|
||||||
|
status?: HostedRunStatus.AsObject,
|
||||||
|
logsList: Array<common_pb.Log.AsObject>,
|
||||||
|
returnValue?: common_pb.SerializedObject.AsObject,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class HostedRunStatus extends jspb.Message {
|
||||||
|
getState(): HostedRunStatus.State;
|
||||||
|
setState(value: HostedRunStatus.State): HostedRunStatus;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): HostedRunStatus.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: HostedRunStatus): HostedRunStatus.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: HostedRunStatus, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): HostedRunStatus;
|
||||||
|
static deserializeBinaryFromReader(message: HostedRunStatus, reader: jspb.BinaryReader): HostedRunStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace HostedRunStatus {
|
||||||
|
export type AsObject = {
|
||||||
|
state: HostedRunStatus.State,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum State {
|
||||||
|
IN_PROGRESS = 0,
|
||||||
|
SUCCESS = 1,
|
||||||
|
INTERNAL_FAILURE = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MachineRequirements extends jspb.Message {
|
||||||
|
getMachineType(): string;
|
||||||
|
setMachineType(value: string): MachineRequirements;
|
||||||
|
|
||||||
|
hasKeepAlive(): boolean;
|
||||||
|
clearKeepAlive(): void;
|
||||||
|
getKeepAlive(): number | undefined;
|
||||||
|
setKeepAlive(value: number): MachineRequirements;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): MachineRequirements.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: MachineRequirements): MachineRequirements.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: MachineRequirements, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): MachineRequirements;
|
||||||
|
static deserializeBinaryFromReader(message: MachineRequirements, reader: jspb.BinaryReader): MachineRequirements;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace MachineRequirements {
|
||||||
|
export type AsObject = {
|
||||||
|
machineType: string,
|
||||||
|
keepAlive?: number,
|
||||||
|
}
|
||||||
|
}
|
||||||
4312
proto/generated/controller_pb.js
Normal file
4312
proto/generated/controller_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
41
proto/generated/server_grpc_pb.d.ts
vendored
Normal file
41
proto/generated/server_grpc_pb.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// package:
|
||||||
|
// file: server.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import * as server_pb from "./server_pb";
|
||||||
|
import * as common_pb from "./common_pb";
|
||||||
|
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
||||||
|
|
||||||
|
interface IIsolateService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
run: IIsolateService_IRun;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IIsolateService_IRun extends grpc.MethodDefinition<server_pb.BoundFunction, common_pb.PartialRunResult> {
|
||||||
|
path: "/Isolate/Run";
|
||||||
|
requestStream: false;
|
||||||
|
responseStream: true;
|
||||||
|
requestSerialize: grpc.serialize<server_pb.BoundFunction>;
|
||||||
|
requestDeserialize: grpc.deserialize<server_pb.BoundFunction>;
|
||||||
|
responseSerialize: grpc.serialize<common_pb.PartialRunResult>;
|
||||||
|
responseDeserialize: grpc.deserialize<common_pb.PartialRunResult>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const IsolateService: IIsolateService;
|
||||||
|
|
||||||
|
export interface IIsolateServer extends grpc.UntypedServiceImplementation {
|
||||||
|
run: grpc.handleServerStreamingCall<server_pb.BoundFunction, common_pb.PartialRunResult>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IIsolateClient {
|
||||||
|
run(request: server_pb.BoundFunction, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<common_pb.PartialRunResult>;
|
||||||
|
run(request: server_pb.BoundFunction, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<common_pb.PartialRunResult>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class IsolateClient extends grpc.Client implements IIsolateClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
|
||||||
|
public run(request: server_pb.BoundFunction, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<common_pb.PartialRunResult>;
|
||||||
|
public run(request: server_pb.BoundFunction, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<common_pb.PartialRunResult>;
|
||||||
|
}
|
||||||
48
proto/generated/server_grpc_pb.js
Normal file
48
proto/generated/server_grpc_pb.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('grpc');
|
||||||
|
var server_pb = require('./server_pb.js');
|
||||||
|
var common_pb = require('./common_pb.js');
|
||||||
|
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
||||||
|
|
||||||
|
function serialize_BoundFunction(arg) {
|
||||||
|
if (!(arg instanceof server_pb.BoundFunction)) {
|
||||||
|
throw new Error('Expected argument of type BoundFunction');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_BoundFunction(buffer_arg) {
|
||||||
|
return server_pb.BoundFunction.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_PartialRunResult(arg) {
|
||||||
|
if (!(arg instanceof common_pb.PartialRunResult)) {
|
||||||
|
throw new Error('Expected argument of type PartialRunResult');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_PartialRunResult(buffer_arg) {
|
||||||
|
return common_pb.PartialRunResult.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var IsolateService = exports.IsolateService = {
|
||||||
|
// Run the given function on the specified environment. Streams logs
|
||||||
|
// and the result originating from that function.
|
||||||
|
run: {
|
||||||
|
path: '/Isolate/Run',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: server_pb.BoundFunction,
|
||||||
|
responseType: common_pb.PartialRunResult,
|
||||||
|
requestSerialize: serialize_BoundFunction,
|
||||||
|
requestDeserialize: deserialize_BoundFunction,
|
||||||
|
responseSerialize: serialize_PartialRunResult,
|
||||||
|
responseDeserialize: deserialize_PartialRunResult,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.IsolateClient = grpc.makeGenericClientConstructor(IsolateService);
|
||||||
72
proto/generated/server_pb.d.ts
vendored
Normal file
72
proto/generated/server_pb.d.ts
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
// package:
|
||||||
|
// file: server.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
import * as common_pb from "./common_pb";
|
||||||
|
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
||||||
|
|
||||||
|
export class BoundFunction extends jspb.Message {
|
||||||
|
clearEnvironmentsList(): void;
|
||||||
|
getEnvironmentsList(): Array<EnvironmentDefinition>;
|
||||||
|
setEnvironmentsList(value: Array<EnvironmentDefinition>): BoundFunction;
|
||||||
|
addEnvironments(value?: EnvironmentDefinition, index?: number): EnvironmentDefinition;
|
||||||
|
|
||||||
|
hasFunction(): boolean;
|
||||||
|
clearFunction(): void;
|
||||||
|
getFunction(): common_pb.SerializedObject | undefined;
|
||||||
|
setFunction(value?: common_pb.SerializedObject): BoundFunction;
|
||||||
|
|
||||||
|
hasSetupFunc(): boolean;
|
||||||
|
clearSetupFunc(): void;
|
||||||
|
getSetupFunc(): common_pb.SerializedObject | undefined;
|
||||||
|
setSetupFunc(value?: common_pb.SerializedObject): BoundFunction;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): BoundFunction.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: BoundFunction): BoundFunction.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: BoundFunction, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): BoundFunction;
|
||||||
|
static deserializeBinaryFromReader(message: BoundFunction, reader: jspb.BinaryReader): BoundFunction;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace BoundFunction {
|
||||||
|
export type AsObject = {
|
||||||
|
environmentsList: Array<EnvironmentDefinition.AsObject>,
|
||||||
|
pb_function?: common_pb.SerializedObject.AsObject,
|
||||||
|
setupFunc?: common_pb.SerializedObject.AsObject,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class EnvironmentDefinition extends jspb.Message {
|
||||||
|
getKind(): string;
|
||||||
|
setKind(value: string): EnvironmentDefinition;
|
||||||
|
|
||||||
|
hasConfiguration(): boolean;
|
||||||
|
clearConfiguration(): void;
|
||||||
|
getConfiguration(): google_protobuf_struct_pb.Struct | undefined;
|
||||||
|
setConfiguration(value?: google_protobuf_struct_pb.Struct): EnvironmentDefinition;
|
||||||
|
getForce(): boolean;
|
||||||
|
setForce(value: boolean): EnvironmentDefinition;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): EnvironmentDefinition.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: EnvironmentDefinition): EnvironmentDefinition.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: EnvironmentDefinition, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): EnvironmentDefinition;
|
||||||
|
static deserializeBinaryFromReader(message: EnvironmentDefinition, reader: jspb.BinaryReader): EnvironmentDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace EnvironmentDefinition {
|
||||||
|
export type AsObject = {
|
||||||
|
kind: string,
|
||||||
|
configuration?: google_protobuf_struct_pb.Struct.AsObject,
|
||||||
|
force: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
539
proto/generated/server_pb.js
Normal file
539
proto/generated/server_pb.js
Normal file
@ -0,0 +1,539 @@
|
|||||||
|
// source: server.proto
|
||||||
|
/**
|
||||||
|
* @fileoverview
|
||||||
|
* @enhanceable
|
||||||
|
* @suppress {missingRequire} reports error on implicit type usages.
|
||||||
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||||
|
* field starts with 'MSG_' and isn't a translatable message.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
var jspb = require('google-protobuf');
|
||||||
|
var goog = jspb;
|
||||||
|
var global = Function('return this')();
|
||||||
|
|
||||||
|
var common_pb = require('./common_pb.js');
|
||||||
|
goog.object.extend(proto, common_pb);
|
||||||
|
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
||||||
|
goog.object.extend(proto, google_protobuf_struct_pb);
|
||||||
|
goog.exportSymbol('proto.BoundFunction', null, global);
|
||||||
|
goog.exportSymbol('proto.EnvironmentDefinition', null, global);
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.BoundFunction = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.BoundFunction.repeatedFields_, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.BoundFunction, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.displayName = 'proto.BoundFunction';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.EnvironmentDefinition, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.displayName = 'proto.EnvironmentDefinition';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of repeated fields within this message type.
|
||||||
|
* @private {!Array<number>}
|
||||||
|
* @const
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.repeatedFields_ = [1];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.BoundFunction.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.BoundFunction} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
environmentsList: jspb.Message.toObjectList(msg.getEnvironmentsList(),
|
||||||
|
proto.EnvironmentDefinition.toObject, includeInstance),
|
||||||
|
pb_function: (f = msg.getFunction()) && common_pb.SerializedObject.toObject(includeInstance, f),
|
||||||
|
setupFunc: (f = msg.getSetupFunc()) && common_pb.SerializedObject.toObject(includeInstance, f)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.BoundFunction}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.BoundFunction;
|
||||||
|
return proto.BoundFunction.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.BoundFunction} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.BoundFunction}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = new proto.EnvironmentDefinition;
|
||||||
|
reader.readMessage(value,proto.EnvironmentDefinition.deserializeBinaryFromReader);
|
||||||
|
msg.addEnvironments(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = new common_pb.SerializedObject;
|
||||||
|
reader.readMessage(value,common_pb.SerializedObject.deserializeBinaryFromReader);
|
||||||
|
msg.setFunction(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = new common_pb.SerializedObject;
|
||||||
|
reader.readMessage(value,common_pb.SerializedObject.deserializeBinaryFromReader);
|
||||||
|
msg.setSetupFunc(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.BoundFunction.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.BoundFunction} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getEnvironmentsList();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeRepeatedMessage(
|
||||||
|
1,
|
||||||
|
f,
|
||||||
|
proto.EnvironmentDefinition.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getFunction();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
2,
|
||||||
|
f,
|
||||||
|
common_pb.SerializedObject.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getSetupFunc();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
3,
|
||||||
|
f,
|
||||||
|
common_pb.SerializedObject.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* repeated EnvironmentDefinition environments = 1;
|
||||||
|
* @return {!Array<!proto.EnvironmentDefinition>}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.getEnvironmentsList = function() {
|
||||||
|
return /** @type{!Array<!proto.EnvironmentDefinition>} */ (
|
||||||
|
jspb.Message.getRepeatedWrapperField(this, proto.EnvironmentDefinition, 1));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!Array<!proto.EnvironmentDefinition>} value
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.setEnvironmentsList = function(value) {
|
||||||
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.EnvironmentDefinition=} opt_value
|
||||||
|
* @param {number=} opt_index
|
||||||
|
* @return {!proto.EnvironmentDefinition}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.addEnvironments = function(opt_value, opt_index) {
|
||||||
|
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.EnvironmentDefinition, opt_index);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the list making it empty but non-null.
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.clearEnvironmentsList = function() {
|
||||||
|
return this.setEnvironmentsList([]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional SerializedObject function = 2;
|
||||||
|
* @return {?proto.SerializedObject}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.getFunction = function() {
|
||||||
|
return /** @type{?proto.SerializedObject} */ (
|
||||||
|
jspb.Message.getWrapperField(this, common_pb.SerializedObject, 2));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?proto.SerializedObject|undefined} value
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.setFunction = function(value) {
|
||||||
|
return jspb.Message.setWrapperField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the message field making it undefined.
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.clearFunction = function() {
|
||||||
|
return this.setFunction(undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.hasFunction = function() {
|
||||||
|
return jspb.Message.getField(this, 2) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional SerializedObject setup_func = 3;
|
||||||
|
* @return {?proto.SerializedObject}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.getSetupFunc = function() {
|
||||||
|
return /** @type{?proto.SerializedObject} */ (
|
||||||
|
jspb.Message.getWrapperField(this, common_pb.SerializedObject, 3));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?proto.SerializedObject|undefined} value
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.setSetupFunc = function(value) {
|
||||||
|
return jspb.Message.setWrapperField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the message field making it undefined.
|
||||||
|
* @return {!proto.BoundFunction} returns this
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.clearSetupFunc = function() {
|
||||||
|
return this.setSetupFunc(undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.BoundFunction.prototype.hasSetupFunc = function() {
|
||||||
|
return jspb.Message.getField(this, 3) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.EnvironmentDefinition.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.EnvironmentDefinition} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
kind: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
|
configuration: (f = msg.getConfiguration()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
|
||||||
|
force: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.EnvironmentDefinition}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.EnvironmentDefinition;
|
||||||
|
return proto.EnvironmentDefinition.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.EnvironmentDefinition} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.EnvironmentDefinition}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setKind(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = new google_protobuf_struct_pb.Struct;
|
||||||
|
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
||||||
|
msg.setConfiguration(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {boolean} */ (reader.readBool());
|
||||||
|
msg.setForce(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.EnvironmentDefinition.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.EnvironmentDefinition} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getKind();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getConfiguration();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
2,
|
||||||
|
f,
|
||||||
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getForce();
|
||||||
|
if (f) {
|
||||||
|
writer.writeBool(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string kind = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.getKind = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.EnvironmentDefinition} returns this
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.setKind = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional google.protobuf.Struct configuration = 2;
|
||||||
|
* @return {?proto.google.protobuf.Struct}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.getConfiguration = function() {
|
||||||
|
return /** @type{?proto.google.protobuf.Struct} */ (
|
||||||
|
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?proto.google.protobuf.Struct|undefined} value
|
||||||
|
* @return {!proto.EnvironmentDefinition} returns this
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.setConfiguration = function(value) {
|
||||||
|
return jspb.Message.setWrapperField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the message field making it undefined.
|
||||||
|
* @return {!proto.EnvironmentDefinition} returns this
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.clearConfiguration = function() {
|
||||||
|
return this.setConfiguration(undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.hasConfiguration = function() {
|
||||||
|
return jspb.Message.getField(this, 2) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bool force = 3;
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.getForce = function() {
|
||||||
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean} value
|
||||||
|
* @return {!proto.EnvironmentDefinition} returns this
|
||||||
|
*/
|
||||||
|
proto.EnvironmentDefinition.prototype.setForce = function(value) {
|
||||||
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
goog.object.extend(exports, proto);
|
||||||
25
proto/server.proto
Normal file
25
proto/server.proto
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
import "common.proto";
|
||||||
|
import "google/protobuf/struct.proto";
|
||||||
|
|
||||||
|
service Isolate {
|
||||||
|
// Run the given function on the specified environment. Streams logs
|
||||||
|
// and the result originating from that function.
|
||||||
|
rpc Run (BoundFunction) returns (stream PartialRunResult) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
message BoundFunction {
|
||||||
|
repeated EnvironmentDefinition environments = 1;
|
||||||
|
SerializedObject function = 2;
|
||||||
|
optional SerializedObject setup_func = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message EnvironmentDefinition {
|
||||||
|
// Kind of the isolate environment.
|
||||||
|
string kind = 1;
|
||||||
|
// A free-form definition of environment properties.
|
||||||
|
google.protobuf.Struct configuration = 2;
|
||||||
|
// Whether to force-create this environment or not.
|
||||||
|
bool force = 3;
|
||||||
|
}
|
||||||
BIN
python.dump
Normal file
BIN
python.dump
Normal file
Binary file not shown.
30
simple.py
Normal file
30
simple.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
from dill import dumps
|
||||||
|
from koldstart import isolated, KoldstartHost, CloudKeyCredentials
|
||||||
|
import os
|
||||||
|
from isolate.connections.common import serialize_object
|
||||||
|
|
||||||
|
test_cloud = KoldstartHost(
|
||||||
|
url=os.environ["KOLDSTART_HOST"],
|
||||||
|
credentials=CloudKeyCredentials(
|
||||||
|
key_id=os.environ["KOLDSTART_KEY_ID"],
|
||||||
|
key_secret=os.environ["KOLDSTART_KEY_SECRET"],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def stable_diffusion():
|
||||||
|
print("this is happening from proto update")
|
||||||
|
|
||||||
|
|
||||||
|
# @isolated(host=test_cloud)
|
||||||
|
def buff():
|
||||||
|
print("this is happening from proto update")
|
||||||
|
|
||||||
|
|
||||||
|
path = Path(
|
||||||
|
"/Users/gorkemyurtseven/dev/koldstart-playground/koldstart-javascript/python.dump"
|
||||||
|
).expanduser()
|
||||||
|
with open(path, "wb") as f:
|
||||||
|
print(serialize_object("dill", buff))
|
||||||
|
f.write(serialize_object("dill", buff))
|
||||||
Loading…
x
Reference in New Issue
Block a user