Merge pull request #18 from docker/feat-inspect

Update protos to latest, adds inspect command
This commit is contained in:
Djordje Lukic 2020-07-01 15:29:21 +02:00 коммит произвёл GitHub
Родитель 06d3d19998 0943274c2e
Коммит ab174ae1ff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
38 изменённых файлов: 2062 добавлений и 1187 удалений

6
.github/workflows/main.yml поставляемый
Просмотреть файл

@ -21,6 +21,12 @@ jobs:
restore-keys: |
nodeModules-
- name: Link docker command line
run: ln -s $(which docker) /tmp/com.docker.cli
- name: Add cli to path
run: echo "::add-path::/tmp"
- name: Install dependencies
run: yarn install --frozen-lockfile
env:

34
dist/protos/compose/v1/compose.proto поставляемый
Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

8
dist/protos/compose/v1/compose_grpc_pb.d.ts поставляемый
Просмотреть файл

@ -15,8 +15,8 @@ interface IComposeService extends grpc.ServiceDefinition<grpc.UntypedServiceImpl
interface IComposeService_IUp extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeUpRequest, compose_v1_compose_pb.ComposeUpResponse> {
path: string; // "/com.docker.api.protos.compose.v1.Compose/Up"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpRequest>;
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeUpRequest>;
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpResponse>;
@ -24,8 +24,8 @@ interface IComposeService_IUp extends grpc.MethodDefinition<compose_v1_compose_p
}
interface IComposeService_IDown extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeDownRequest, compose_v1_compose_pb.ComposeDownResponse> {
path: string; // "/com.docker.api.protos.compose.v1.Compose/Down"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownRequest>;
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeDownRequest>;
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownResponse>;

31
dist/protos/compose/v1/compose_grpc_pb.js поставляемый
Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"compose_grpc_pb.js","sourceRoot":"","sources":["../../../../src/protos/compose/v1/compose_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,0BAA0B;AAC1B,EAAE;AACF,iCAAiC;AACjC,EAAE;AACF,8DAA8D;AAC9D,iEAAiE;AACjE,0DAA0D;AAC1D,qEAAqE;AACrE,qEAAqE;AACrE,iEAAiE;AACjE,2DAA2D;AAC3D,EAAE;AACF,iEAAiE;AACjE,kEAAkE;AAClE,EAAE;AACF,kEAAkE;AAClE,sBAAsB;AACtB,kEAAkE;AAClE,wDAAwD;AACxD,6CAA6C;AAC7C,mCAAmC;AACnC,8BAA8B;AAC9B,oCAAoC;AACpC,qBAAqB;AACrB,6CAA6C;AAC7C,6DAA6D;AAC7D,EAAE;AACF,YAAY,CAAC;AACb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6D;QAC/E,kBAAkB,EAAE,+DAA+D;QACnF,iBAAiB,EAAE,8DAA8D;QACjF,mBAAmB,EAAE,gEAAgE;KACtF;CACF,CAAC;AAEF,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,4BAA4B,CAAC,cAAc,CAAC,CAAC"}

46
dist/protos/containers/v1/containers.proto поставляемый
Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
@ -38,6 +26,7 @@ service Containers {
rpc Exec(ExecRequest) returns (ExecResponse);
rpc Logs(LogsRequest) returns (stream LogsResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Inspect(InspectRequest) returns (InspectResponse);
}
message Port {
@ -59,6 +48,15 @@ message Container {
uint64 pids_limit = 9;
repeated string labels = 10;
repeated Port ports = 11;
uint64 cpu_limit = 12;
}
message InspectRequest {
string id = 1;
}
message InspectResponse {
Container container = 1;
}
message DeleteRequest {
@ -83,6 +81,8 @@ message RunRequest {
repeated Port ports = 3;
map<string, string> labels = 4;
repeated string volumes = 5;
uint64 memory_limit = 6;
uint64 cpu_limit = 7;
}
message RunResponse {

Просмотреть файл

@ -15,12 +15,13 @@ interface IContainersService extends grpc.ServiceDefinition<grpc.UntypedServiceI
exec: IContainersService_IExec;
logs: IContainersService_ILogs;
delete: IContainersService_IDelete;
inspect: IContainersService_IInspect;
}
interface IContainersService_IList extends grpc.MethodDefinition<containers_v1_containers_pb.ListRequest, containers_v1_containers_pb.ListResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/List"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.ListRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ListRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.ListResponse>;
@ -28,8 +29,8 @@ interface IContainersService_IList extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_containers_pb.StopRequest, containers_v1_containers_pb.StopResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Stop"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.StopRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.StopRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.StopResponse>;
@ -37,8 +38,8 @@ interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IRun extends grpc.MethodDefinition<containers_v1_containers_pb.RunRequest, containers_v1_containers_pb.RunResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Run"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.RunRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.RunRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.RunResponse>;
@ -46,8 +47,8 @@ interface IContainersService_IRun extends grpc.MethodDefinition<containers_v1_co
}
interface IContainersService_IExec extends grpc.MethodDefinition<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Exec"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.ExecRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ExecRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.ExecResponse>;
@ -55,8 +56,8 @@ interface IContainersService_IExec extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_ILogs extends grpc.MethodDefinition<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Logs"
requestStream: boolean; // false
responseStream: boolean; // true
requestStream: false;
responseStream: true;
requestSerialize: grpc.serialize<containers_v1_containers_pb.LogsRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.LogsRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.LogsResponse>;
@ -64,13 +65,22 @@ interface IContainersService_ILogs extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IDelete extends grpc.MethodDefinition<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Delete"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.DeleteRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.DeleteResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteResponse>;
}
interface IContainersService_IInspect extends grpc.MethodDefinition<containers_v1_containers_pb.InspectRequest, containers_v1_containers_pb.InspectResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Inspect"
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.InspectRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.InspectRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.InspectResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.InspectResponse>;
}
export const ContainersService: IContainersService;
@ -81,6 +91,7 @@ export interface IContainersServer {
exec: grpc.handleUnaryCall<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse>;
logs: grpc.handleServerStreamingCall<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse>;
delete: grpc.handleUnaryCall<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse>;
inspect: grpc.handleUnaryCall<containers_v1_containers_pb.InspectRequest, containers_v1_containers_pb.InspectResponse>;
}
export interface IContainersClient {
@ -101,6 +112,9 @@ export interface IContainersClient {
delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
}
export class ContainersClient extends grpc.Client implements IContainersClient {
@ -122,4 +136,7 @@ export class ContainersClient extends grpc.Client implements IContainersClient {
public delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
}

Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');
@ -75,6 +64,28 @@ function deserialize_com_docker_api_protos_containers_v1_ExecResponse(buffer_arg
return containers_v1_containers_pb.ExecResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_InspectRequest(arg) {
if (!(arg instanceof containers_v1_containers_pb.InspectRequest)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.InspectRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_InspectRequest(buffer_arg) {
return containers_v1_containers_pb.InspectRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_InspectResponse(arg) {
if (!(arg instanceof containers_v1_containers_pb.InspectResponse)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.InspectResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_InspectResponse(buffer_arg) {
return containers_v1_containers_pb.InspectResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_ListRequest(arg) {
if (!(arg instanceof containers_v1_containers_pb.ListRequest)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ListRequest');
@ -231,6 +242,17 @@ var ContainersService = exports.ContainersService = {
responseSerialize: serialize_com_docker_api_protos_containers_v1_DeleteResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_DeleteResponse,
},
inspect: {
path: '/com.docker.api.protos.containers.v1.Containers/Inspect',
requestStream: false,
responseStream: false,
requestType: containers_v1_containers_pb.InspectRequest,
responseType: containers_v1_containers_pb.InspectResponse,
requestSerialize: serialize_com_docker_api_protos_containers_v1_InspectRequest,
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_InspectRequest,
responseSerialize: serialize_com_docker_api_protos_containers_v1_InspectResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_InspectResponse,
},
};
exports.ContainersClient = grpc.makeGenericClientConstructor(ContainersService);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

57
dist/protos/containers/v1/containers_pb.d.ts поставляемый
Просмотреть файл

@ -77,6 +77,9 @@ export class Container extends jspb.Message {
setPortsList(value: Array<Port>): Container;
addPorts(value?: Port, index?: number): Port;
getCpuLimit(): number;
setCpuLimit(value: number): Container;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Container.AsObject;
@ -101,6 +104,52 @@ export namespace Container {
pidsLimit: number,
labelsList: Array<string>,
portsList: Array<Port.AsObject>,
cpuLimit: number,
}
}
export class InspectRequest extends jspb.Message {
getId(): string;
setId(value: string): InspectRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InspectRequest.AsObject;
static toObject(includeInstance: boolean, msg: InspectRequest): InspectRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InspectRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InspectRequest;
static deserializeBinaryFromReader(message: InspectRequest, reader: jspb.BinaryReader): InspectRequest;
}
export namespace InspectRequest {
export type AsObject = {
id: string,
}
}
export class InspectResponse extends jspb.Message {
hasContainer(): boolean;
clearContainer(): void;
getContainer(): Container | undefined;
setContainer(value?: Container): InspectResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InspectResponse.AsObject;
static toObject(includeInstance: boolean, msg: InspectResponse): InspectResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InspectResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InspectResponse;
static deserializeBinaryFromReader(message: InspectResponse, reader: jspb.BinaryReader): InspectResponse;
}
export namespace InspectResponse {
export type AsObject = {
container?: Container.AsObject,
}
}
@ -209,6 +258,12 @@ export class RunRequest extends jspb.Message {
setVolumesList(value: Array<string>): RunRequest;
addVolumes(value: string, index?: number): string;
getMemoryLimit(): number;
setMemoryLimit(value: number): RunRequest;
getCpuLimit(): number;
setCpuLimit(value: number): RunRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RunRequest.AsObject;
@ -228,6 +283,8 @@ export namespace RunRequest {
labelsMap: Array<[string, string]>,
volumesList: Array<string>,
memoryLimit: number,
cpuLimit: number,
}
}

419
dist/protos/containers/v1/containers_pb.js поставляемый
Просмотреть файл

@ -17,6 +17,8 @@ goog.exportSymbol('proto.com.docker.api.protos.containers.v1.DeleteRequest', nul
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.DeleteResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.LogsRequest', null, global);
@ -68,6 +70,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.com.docker.api.protos.containers.v1.Container.displayName = 'proto.com.docker.api.protos.containers.v1.Container';
}
/**
* 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.com.docker.api.protos.containers.v1.InspectRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.InspectRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.displayName = 'proto.com.docker.api.protos.containers.v1.InspectRequest';
}
/**
* 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.com.docker.api.protos.containers.v1.InspectResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.InspectResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.displayName = 'proto.com.docker.api.protos.containers.v1.InspectResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -590,7 +634,8 @@ proto.com.docker.api.protos.containers.v1.Container.toObject = function(includeI
pidsLimit: jspb.Message.getFieldWithDefault(msg, 9, 0),
labelsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f,
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance)
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance),
cpuLimit: jspb.Message.getFieldWithDefault(msg, 12, 0)
};
if (includeInstance) {
@ -672,6 +717,10 @@ proto.com.docker.api.protos.containers.v1.Container.deserializeBinaryFromReader
reader.readMessage(value,proto.com.docker.api.protos.containers.v1.Port.deserializeBinaryFromReader);
msg.addPorts(value);
break;
case 12:
var value = /** @type {number} */ (reader.readUint64());
msg.setCpuLimit(value);
break;
default:
reader.skipField();
break;
@ -779,6 +828,13 @@ proto.com.docker.api.protos.containers.v1.Container.serializeBinaryToWriter = fu
proto.com.docker.api.protos.containers.v1.Port.serializeBinaryToWriter
);
}
f = message.getCpuLimit();
if (f !== 0) {
writer.writeUint64(
12,
f
);
}
};
@ -1019,6 +1075,305 @@ proto.com.docker.api.protos.containers.v1.Container.prototype.clearPortsList = f
};
/**
* optional uint64 cpu_limit = 12;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.Container.prototype.getCpuLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.Container} returns this
*/
proto.com.docker.api.protos.containers.v1.Container.prototype.setCpuLimit = function(value) {
return jspb.Message.setProto3IntField(this, 12, value);
};
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.com.docker.api.protos.containers.v1.InspectRequest.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.InspectRequest.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.com.docker.api.protos.containers.v1.InspectRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.InspectRequest;
return proto.com.docker.api.protos.containers.v1.InspectRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.docker.api.protos.containers.v1.InspectRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.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.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.InspectRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.docker.api.protos.containers.v1.InspectRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
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.com.docker.api.protos.containers.v1.InspectResponse.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.InspectResponse.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.com.docker.api.protos.containers.v1.InspectResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.toObject = function(includeInstance, msg) {
var f, obj = {
container: (f = msg.getContainer()) && proto.com.docker.api.protos.containers.v1.Container.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.com.docker.api.protos.containers.v1.InspectResponse}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.InspectResponse;
return proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.docker.api.protos.containers.v1.InspectResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.com.docker.api.protos.containers.v1.Container;
reader.readMessage(value,proto.com.docker.api.protos.containers.v1.Container.deserializeBinaryFromReader);
msg.setContainer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.InspectResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.docker.api.protos.containers.v1.InspectResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getContainer();
if (f != null) {
writer.writeMessage(
1,
f,
proto.com.docker.api.protos.containers.v1.Container.serializeBinaryToWriter
);
}
};
/**
* optional Container container = 1;
* @return {?proto.com.docker.api.protos.containers.v1.Container}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.getContainer = function() {
return /** @type{?proto.com.docker.api.protos.containers.v1.Container} */ (
jspb.Message.getWrapperField(this, proto.com.docker.api.protos.containers.v1.Container, 1));
};
/**
* @param {?proto.com.docker.api.protos.containers.v1.Container|undefined} value
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.setContainer = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.clearContainer = function() {
return this.setContainer(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.hasContainer = function() {
return jspb.Message.getField(this, 1) != null;
};
@ -1585,7 +1940,9 @@ proto.com.docker.api.protos.containers.v1.RunRequest.toObject = function(include
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
volumesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
volumesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
memoryLimit: jspb.Message.getFieldWithDefault(msg, 6, 0),
cpuLimit: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
@ -1645,6 +2002,14 @@ proto.com.docker.api.protos.containers.v1.RunRequest.deserializeBinaryFromReader
var value = /** @type {string} */ (reader.readString());
msg.addVolumes(value);
break;
case 6:
var value = /** @type {number} */ (reader.readUint64());
msg.setMemoryLimit(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setCpuLimit(value);
break;
default:
reader.skipField();
break;
@ -1707,6 +2072,20 @@ proto.com.docker.api.protos.containers.v1.RunRequest.serializeBinaryToWriter = f
f
);
}
f = message.getMemoryLimit();
if (f !== 0) {
writer.writeUint64(
6,
f
);
}
f = message.getCpuLimit();
if (f !== 0) {
writer.writeUint64(
7,
f
);
}
};
@ -1843,6 +2222,42 @@ proto.com.docker.api.protos.containers.v1.RunRequest.prototype.clearVolumesList
};
/**
* optional uint64 memory_limit = 6;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getMemoryLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setMemoryLimit = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional uint64 cpu_limit = 7;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getCpuLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setCpuLimit = function(value) {
return jspb.Message.setProto3IntField(this, 7, value);
};

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

34
dist/protos/contexts/v1/contexts.proto поставляемый
Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

Просмотреть файл

@ -15,8 +15,8 @@ interface IContextsService extends grpc.ServiceDefinition<grpc.UntypedServiceImp
interface IContextsService_ISetCurrent extends grpc.MethodDefinition<contexts_v1_contexts_pb.SetCurrentRequest, contexts_v1_contexts_pb.SetCurrentResponse> {
path: string; // "/com.docker.api.protos.context.v1.Contexts/SetCurrent"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentRequest>;
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.SetCurrentRequest>;
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentResponse>;
@ -24,8 +24,8 @@ interface IContextsService_ISetCurrent extends grpc.MethodDefinition<contexts_v1
}
interface IContextsService_IList extends grpc.MethodDefinition<contexts_v1_contexts_pb.ListRequest, contexts_v1_contexts_pb.ListResponse> {
path: string; // "/com.docker.api.protos.context.v1.Contexts/List"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.ListRequest>;
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.ListRequest>;
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.ListResponse>;

31
dist/protos/contexts/v1/contexts_grpc_pb.js поставляемый
Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"contexts_grpc_pb.js","sourceRoot":"","sources":["../../../../src/protos/contexts/v1/contexts_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,0BAA0B;AAC1B,EAAE;AACF,iCAAiC;AACjC,EAAE;AACF,8DAA8D;AAC9D,iEAAiE;AACjE,0DAA0D;AAC1D,qEAAqE;AACrE,qEAAqE;AACrE,iEAAiE;AACjE,2DAA2D;AAC3D,EAAE;AACF,iEAAiE;AACjE,kEAAkE;AAClE,EAAE;AACF,kEAAkE;AAClE,sBAAsB;AACtB,kEAAkE;AAClE,wDAAwD;AACxD,6CAA6C;AAC7C,mCAAmC;AACnC,8BAA8B;AAC9B,oCAAoC;AACpC,qBAAqB;AACrB,6CAA6C;AAC7C,6DAA6D;AAC7D,EAAE;AACF,YAAY,CAAC;AACb,IAAI,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACpC,IAAI,uBAAuB,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAE1E,SAAS,sDAAsD,CAAC,GAAG;IACjE,IAAI,CAAC,CAAC,GAAG,YAAY,uBAAuB,CAAC,WAAW,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;KAC3F;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,wDAAwD,CAAC,UAAU;IAC1E,OAAO,uBAAuB,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED,SAAS,uDAAuD,CAAC,GAAG;IAClE,IAAI,CAAC,CAAC,GAAG,YAAY,uBAAuB,CAAC,YAAY,CAAC,EAAE;QAC1D,MAAM,IAAI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;QACtD,YAAY,EAAE,uBAAuB,CAAC,kBAAkB;QACxD,gBAAgB,EAAE,4DAA4D;QAC9E,kBAAkB,EAAE,8DAA8D;QAClF,iBAAiB,EAAE,6DAA6D;QAChF,mBAAmB,EAAE,+DAA+D;KACrF;IACD,wCAAwC;IAC1C,IAAI,EAAE;QACF,IAAI,EAAE,iDAAiD;QACvD,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,uBAAuB,CAAC,WAAW;QAChD,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,gBAAgB,EAAE,sDAAsD;QACxE,kBAAkB,EAAE,wDAAwD;QAC5E,iBAAiB,EAAE,uDAAuD;QAC1E,mBAAmB,EAAE,yDAAyD;KAC/E;CACF,CAAC;AAEF,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,CAAC"}
{"version":3,"file":"contexts_grpc_pb.js","sourceRoot":"","sources":["../../../../src/protos/contexts/v1/contexts_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,0BAA0B;AAC1B,EAAE;AACF,+BAA+B;AAC/B,EAAE;AACF,mEAAmE;AACnE,oEAAoE;AACpE,2CAA2C;AAC3C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,uEAAuE;AACvE,qEAAqE;AACrE,4EAA4E;AAC5E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,YAAY,CAAC;AACb,IAAI,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACpC,IAAI,uBAAuB,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAE1E,SAAS,sDAAsD,CAAC,GAAG;IACjE,IAAI,CAAC,CAAC,GAAG,YAAY,uBAAuB,CAAC,WAAW,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;KAC3F;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EA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,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAClG,CAAC;AAGD,IAAI,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG;IAC9C,yCAAyC;IAC3C,UAAU,EAAE;QACR,IAAI,EAAE,uDAAuD;QAC7D,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,uBAAuB,CAAC,iBAAiB;QACtD,YAAY,EAAE,uBAAuB,CAAC,kBAAkB;QACxD,gBAAgB,EAAE,4DAA4D;QAC9E,kBAAkB,EAAE,8DAA8D;QAClF,iBAAiB,EAAE,6DAA6D;QAChF,mBAAmB,EAAE,+DAA+D;KACrF;IACD,wCAAwC;IAC1C,IAAI,EAAE;QACF,IAAI,EAAE,iDAAiD;QACvD,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,uBAAuB,CAAC,WAAW;QAChD,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,gBAAgB,EAAE,sDAAsD;QACxE,kBAAkB,EAAE,wDAAwD;QAC5E,iBAAiB,EAAE,uDAAuD;QAC1E,mBAAmB,EAAE,yDAAyD;KAC/E;CACF,CAAC;AAEF,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,CAAC"}

15
dist/protos/streams/v1/streams.proto поставляемый
Просмотреть файл

@ -1,3 +1,18 @@
//
// Copyright 2020 Docker, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package com.docker.api.protos.streams.v1;

4
dist/protos/streams/v1/streams_grpc_pb.d.ts поставляемый
Просмотреть файл

@ -15,8 +15,8 @@ interface IStreamingService extends grpc.ServiceDefinition<grpc.UntypedServiceIm
interface IStreamingService_INewStream extends grpc.MethodDefinition<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any> {
path: string; // "/com.docker.api.protos.streams.v1.Streaming/NewStream"
requestStream: boolean; // true
responseStream: boolean; // true
requestStream: true;
responseStream: true;
requestSerialize: grpc.serialize<google_protobuf_any_pb.Any>;
requestDeserialize: grpc.deserialize<google_protobuf_any_pb.Any>;
responseSerialize: grpc.serialize<google_protobuf_any_pb.Any>;

16
dist/protos/streams/v1/streams_grpc_pb.js поставляемый
Просмотреть файл

@ -1,5 +1,21 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
//
// Copyright 2020 Docker, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');
var streams_v1_streams_pb = require('../../streams/v1/streams_pb.js');

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"streams_grpc_pb.js","sourceRoot":"","sources":["../../../../src/protos/streams/v1/streams_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,YAAY,CAAC;AACb,IAAI,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACpC,IAAI,qBAAqB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACtE,IAAI,sBAAsB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC;AAElF,SAAS,6BAA6B,CAAC,GAAG;IACxC,IAAI,CAAC,CAAC,GAAG,YAAY,sBAAsB,CAAC,GAAG,CAAC,EAAE;QAChD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,+BAA+B,CAAC,UAAU;IACjD,OAAO,sBAAsB,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAClF,CAAC;AAGD,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,GAAG;IAChD,SAAS,EAAE;QACT,IAAI,EAAE,uDAAuD;QAC7D,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,WAAW,EAAE,sBAAsB,CAAC,GAAG;QACvC,YAAY,EAAE,sBAAsB,CAAC,GAAG;QACxC,gBAAgB,EAAE,6BAA6B;QAC/C,kBAAkB,EAAE,+BAA+B;QACnD,iBAAiB,EAAE,6BAA6B;QAChD,mBAAmB,EAAE,+BAA+B;KACrD;CACF,CAAC;AAEF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC"}
{"version":3,"file":"streams_grpc_pb.js","sourceRoot":"","sources":["../../../../src/protos/streams/v1/streams_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,0BAA0B;AAC1B,EAAE;AACF,+BAA+B;AAC/B,EAAE;AACF,mEAAmE;AACnE,oEAAoE;AACpE,2CAA2C;AAC3C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,uEAAuE;AACvE,qEAAqE;AACrE,4EAA4E;AAC5E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,YAAY,CAAC;AACb,IAAI,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACpC,IAAI,qBAAqB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACtE,IAAI,sBAAsB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC;AAElF,SAAS,6BAA6B,CAAC,GAAG;IACxC,IAAI,CAAC,CAAC,GAAG,YAAY,sBAAsB,CAAC,GAAG,CAAC,EAAE;QAChD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,+BAA+B,CAAC,UAAU;IACjD,OAAO,sBAAsB,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAClF,CAAC;AAGD,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,GAAG;IAChD,SAAS,EAAE;QACT,IAAI,EAAE,uDAAuD;QAC7D,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,WAAW,EAAE,sBAAsB,CAAC,GAAG;QACvC,YAAY,EAAE,sBAAsB,CAAC,GAAG;QACxC,gBAAgB,EAAE,6BAA6B;QAC/C,kBAAkB,EAAE,+BAA+B;QACnD,iBAAiB,EAAE,6BAA6B;QAChD,mBAAmB,EAAE,+BAA+B;KACrD;CACF,CAAC;AAEF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC"}

Просмотреть файл

@ -52,7 +52,7 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.0.5",
"@octokit/rest": "^17.10.0",
"@octokit/rest": "^18.0.0",
"google-auth-library": "^6.0.1",
"google-protobuf": "^3.12.2"
}

Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

8
src/protos/compose/v1/compose_grpc_pb.d.ts поставляемый
Просмотреть файл

@ -15,8 +15,8 @@ interface IComposeService extends grpc.ServiceDefinition<grpc.UntypedServiceImpl
interface IComposeService_IUp extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeUpRequest, compose_v1_compose_pb.ComposeUpResponse> {
path: string; // "/com.docker.api.protos.compose.v1.Compose/Up"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpRequest>;
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeUpRequest>;
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpResponse>;
@ -24,8 +24,8 @@ interface IComposeService_IUp extends grpc.MethodDefinition<compose_v1_compose_p
}
interface IComposeService_IDown extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeDownRequest, compose_v1_compose_pb.ComposeDownResponse> {
path: string; // "/com.docker.api.protos.compose.v1.Compose/Down"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownRequest>;
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeDownRequest>;
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownResponse>;

Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');

Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
@ -38,6 +26,7 @@ service Containers {
rpc Exec(ExecRequest) returns (ExecResponse);
rpc Logs(LogsRequest) returns (stream LogsResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Inspect(InspectRequest) returns (InspectResponse);
}
message Port {
@ -59,6 +48,15 @@ message Container {
uint64 pids_limit = 9;
repeated string labels = 10;
repeated Port ports = 11;
uint64 cpu_limit = 12;
}
message InspectRequest {
string id = 1;
}
message InspectResponse {
Container container = 1;
}
message DeleteRequest {
@ -83,6 +81,8 @@ message RunRequest {
repeated Port ports = 3;
map<string, string> labels = 4;
repeated string volumes = 5;
uint64 memory_limit = 6;
uint64 cpu_limit = 7;
}
message RunResponse {

Просмотреть файл

@ -15,12 +15,13 @@ interface IContainersService extends grpc.ServiceDefinition<grpc.UntypedServiceI
exec: IContainersService_IExec;
logs: IContainersService_ILogs;
delete: IContainersService_IDelete;
inspect: IContainersService_IInspect;
}
interface IContainersService_IList extends grpc.MethodDefinition<containers_v1_containers_pb.ListRequest, containers_v1_containers_pb.ListResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/List"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.ListRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ListRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.ListResponse>;
@ -28,8 +29,8 @@ interface IContainersService_IList extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_containers_pb.StopRequest, containers_v1_containers_pb.StopResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Stop"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.StopRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.StopRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.StopResponse>;
@ -37,8 +38,8 @@ interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IRun extends grpc.MethodDefinition<containers_v1_containers_pb.RunRequest, containers_v1_containers_pb.RunResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Run"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.RunRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.RunRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.RunResponse>;
@ -46,8 +47,8 @@ interface IContainersService_IRun extends grpc.MethodDefinition<containers_v1_co
}
interface IContainersService_IExec extends grpc.MethodDefinition<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Exec"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.ExecRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ExecRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.ExecResponse>;
@ -55,8 +56,8 @@ interface IContainersService_IExec extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_ILogs extends grpc.MethodDefinition<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Logs"
requestStream: boolean; // false
responseStream: boolean; // true
requestStream: false;
responseStream: true;
requestSerialize: grpc.serialize<containers_v1_containers_pb.LogsRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.LogsRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.LogsResponse>;
@ -64,13 +65,22 @@ interface IContainersService_ILogs extends grpc.MethodDefinition<containers_v1_c
}
interface IContainersService_IDelete extends grpc.MethodDefinition<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Delete"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.DeleteRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.DeleteResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteResponse>;
}
interface IContainersService_IInspect extends grpc.MethodDefinition<containers_v1_containers_pb.InspectRequest, containers_v1_containers_pb.InspectResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Inspect"
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.InspectRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.InspectRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.InspectResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.InspectResponse>;
}
export const ContainersService: IContainersService;
@ -81,6 +91,7 @@ export interface IContainersServer {
exec: grpc.handleUnaryCall<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse>;
logs: grpc.handleServerStreamingCall<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse>;
delete: grpc.handleUnaryCall<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse>;
inspect: grpc.handleUnaryCall<containers_v1_containers_pb.InspectRequest, containers_v1_containers_pb.InspectResponse>;
}
export interface IContainersClient {
@ -101,6 +112,9 @@ export interface IContainersClient {
delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
}
export class ContainersClient extends grpc.Client implements IContainersClient {
@ -122,4 +136,7 @@ export class ContainersClient extends grpc.Client implements IContainersClient {
public delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
public inspect(request: containers_v1_containers_pb.InspectRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.InspectResponse) => void): grpc.ClientUnaryCall;
}

Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');
@ -75,6 +64,28 @@ function deserialize_com_docker_api_protos_containers_v1_ExecResponse(buffer_arg
return containers_v1_containers_pb.ExecResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_InspectRequest(arg) {
if (!(arg instanceof containers_v1_containers_pb.InspectRequest)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.InspectRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_InspectRequest(buffer_arg) {
return containers_v1_containers_pb.InspectRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_InspectResponse(arg) {
if (!(arg instanceof containers_v1_containers_pb.InspectResponse)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.InspectResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_InspectResponse(buffer_arg) {
return containers_v1_containers_pb.InspectResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_ListRequest(arg) {
if (!(arg instanceof containers_v1_containers_pb.ListRequest)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ListRequest');
@ -231,6 +242,17 @@ var ContainersService = exports.ContainersService = {
responseSerialize: serialize_com_docker_api_protos_containers_v1_DeleteResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_DeleteResponse,
},
inspect: {
path: '/com.docker.api.protos.containers.v1.Containers/Inspect',
requestStream: false,
responseStream: false,
requestType: containers_v1_containers_pb.InspectRequest,
responseType: containers_v1_containers_pb.InspectResponse,
requestSerialize: serialize_com_docker_api_protos_containers_v1_InspectRequest,
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_InspectRequest,
responseSerialize: serialize_com_docker_api_protos_containers_v1_InspectResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_InspectResponse,
},
};
exports.ContainersClient = grpc.makeGenericClientConstructor(ContainersService);

57
src/protos/containers/v1/containers_pb.d.ts поставляемый
Просмотреть файл

@ -77,6 +77,9 @@ export class Container extends jspb.Message {
setPortsList(value: Array<Port>): Container;
addPorts(value?: Port, index?: number): Port;
getCpuLimit(): number;
setCpuLimit(value: number): Container;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Container.AsObject;
@ -101,6 +104,52 @@ export namespace Container {
pidsLimit: number,
labelsList: Array<string>,
portsList: Array<Port.AsObject>,
cpuLimit: number,
}
}
export class InspectRequest extends jspb.Message {
getId(): string;
setId(value: string): InspectRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InspectRequest.AsObject;
static toObject(includeInstance: boolean, msg: InspectRequest): InspectRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InspectRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InspectRequest;
static deserializeBinaryFromReader(message: InspectRequest, reader: jspb.BinaryReader): InspectRequest;
}
export namespace InspectRequest {
export type AsObject = {
id: string,
}
}
export class InspectResponse extends jspb.Message {
hasContainer(): boolean;
clearContainer(): void;
getContainer(): Container | undefined;
setContainer(value?: Container): InspectResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InspectResponse.AsObject;
static toObject(includeInstance: boolean, msg: InspectResponse): InspectResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InspectResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InspectResponse;
static deserializeBinaryFromReader(message: InspectResponse, reader: jspb.BinaryReader): InspectResponse;
}
export namespace InspectResponse {
export type AsObject = {
container?: Container.AsObject,
}
}
@ -209,6 +258,12 @@ export class RunRequest extends jspb.Message {
setVolumesList(value: Array<string>): RunRequest;
addVolumes(value: string, index?: number): string;
getMemoryLimit(): number;
setMemoryLimit(value: number): RunRequest;
getCpuLimit(): number;
setCpuLimit(value: number): RunRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RunRequest.AsObject;
@ -228,6 +283,8 @@ export namespace RunRequest {
labelsMap: Array<[string, string]>,
volumesList: Array<string>,
memoryLimit: number,
cpuLimit: number,
}
}

Просмотреть файл

@ -17,6 +17,8 @@ goog.exportSymbol('proto.com.docker.api.protos.containers.v1.DeleteRequest', nul
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.DeleteResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.LogsRequest', null, global);
@ -68,6 +70,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.com.docker.api.protos.containers.v1.Container.displayName = 'proto.com.docker.api.protos.containers.v1.Container';
}
/**
* 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.com.docker.api.protos.containers.v1.InspectRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.InspectRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.displayName = 'proto.com.docker.api.protos.containers.v1.InspectRequest';
}
/**
* 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.com.docker.api.protos.containers.v1.InspectResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.InspectResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.displayName = 'proto.com.docker.api.protos.containers.v1.InspectResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -590,7 +634,8 @@ proto.com.docker.api.protos.containers.v1.Container.toObject = function(includeI
pidsLimit: jspb.Message.getFieldWithDefault(msg, 9, 0),
labelsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f,
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance)
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance),
cpuLimit: jspb.Message.getFieldWithDefault(msg, 12, 0)
};
if (includeInstance) {
@ -672,6 +717,10 @@ proto.com.docker.api.protos.containers.v1.Container.deserializeBinaryFromReader
reader.readMessage(value,proto.com.docker.api.protos.containers.v1.Port.deserializeBinaryFromReader);
msg.addPorts(value);
break;
case 12:
var value = /** @type {number} */ (reader.readUint64());
msg.setCpuLimit(value);
break;
default:
reader.skipField();
break;
@ -779,6 +828,13 @@ proto.com.docker.api.protos.containers.v1.Container.serializeBinaryToWriter = fu
proto.com.docker.api.protos.containers.v1.Port.serializeBinaryToWriter
);
}
f = message.getCpuLimit();
if (f !== 0) {
writer.writeUint64(
12,
f
);
}
};
@ -1019,6 +1075,305 @@ proto.com.docker.api.protos.containers.v1.Container.prototype.clearPortsList = f
};
/**
* optional uint64 cpu_limit = 12;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.Container.prototype.getCpuLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.Container} returns this
*/
proto.com.docker.api.protos.containers.v1.Container.prototype.setCpuLimit = function(value) {
return jspb.Message.setProto3IntField(this, 12, value);
};
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.com.docker.api.protos.containers.v1.InspectRequest.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.InspectRequest.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.com.docker.api.protos.containers.v1.InspectRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.InspectRequest;
return proto.com.docker.api.protos.containers.v1.InspectRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.docker.api.protos.containers.v1.InspectRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.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.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.InspectRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.docker.api.protos.containers.v1.InspectRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.com.docker.api.protos.containers.v1.InspectRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
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.com.docker.api.protos.containers.v1.InspectResponse.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.InspectResponse.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.com.docker.api.protos.containers.v1.InspectResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.toObject = function(includeInstance, msg) {
var f, obj = {
container: (f = msg.getContainer()) && proto.com.docker.api.protos.containers.v1.Container.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.com.docker.api.protos.containers.v1.InspectResponse}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.InspectResponse;
return proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.docker.api.protos.containers.v1.InspectResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.com.docker.api.protos.containers.v1.Container;
reader.readMessage(value,proto.com.docker.api.protos.containers.v1.Container.deserializeBinaryFromReader);
msg.setContainer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.InspectResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.docker.api.protos.containers.v1.InspectResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getContainer();
if (f != null) {
writer.writeMessage(
1,
f,
proto.com.docker.api.protos.containers.v1.Container.serializeBinaryToWriter
);
}
};
/**
* optional Container container = 1;
* @return {?proto.com.docker.api.protos.containers.v1.Container}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.getContainer = function() {
return /** @type{?proto.com.docker.api.protos.containers.v1.Container} */ (
jspb.Message.getWrapperField(this, proto.com.docker.api.protos.containers.v1.Container, 1));
};
/**
* @param {?proto.com.docker.api.protos.containers.v1.Container|undefined} value
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.setContainer = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.com.docker.api.protos.containers.v1.InspectResponse} returns this
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.clearContainer = function() {
return this.setContainer(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.com.docker.api.protos.containers.v1.InspectResponse.prototype.hasContainer = function() {
return jspb.Message.getField(this, 1) != null;
};
@ -1585,7 +1940,9 @@ proto.com.docker.api.protos.containers.v1.RunRequest.toObject = function(include
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.com.docker.api.protos.containers.v1.Port.toObject, includeInstance),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
volumesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
volumesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
memoryLimit: jspb.Message.getFieldWithDefault(msg, 6, 0),
cpuLimit: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
@ -1645,6 +2002,14 @@ proto.com.docker.api.protos.containers.v1.RunRequest.deserializeBinaryFromReader
var value = /** @type {string} */ (reader.readString());
msg.addVolumes(value);
break;
case 6:
var value = /** @type {number} */ (reader.readUint64());
msg.setMemoryLimit(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setCpuLimit(value);
break;
default:
reader.skipField();
break;
@ -1707,6 +2072,20 @@ proto.com.docker.api.protos.containers.v1.RunRequest.serializeBinaryToWriter = f
f
);
}
f = message.getMemoryLimit();
if (f !== 0) {
writer.writeUint64(
6,
f
);
}
f = message.getCpuLimit();
if (f !== 0) {
writer.writeUint64(
7,
f
);
}
};
@ -1843,6 +2222,42 @@ proto.com.docker.api.protos.containers.v1.RunRequest.prototype.clearVolumesList
};
/**
* optional uint64 memory_limit = 6;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getMemoryLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setMemoryLimit = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional uint64 cpu_limit = 7;
* @return {number}
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getCpuLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setCpuLimit = function(value) {
return jspb.Message.setProto3IntField(this, 7, value);
};

Просмотреть файл

@ -1,29 +1,17 @@
/*
Copyright (c) 2020 Docker Inc.
//
// Copyright 2020 Docker, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

Просмотреть файл

@ -15,8 +15,8 @@ interface IContextsService extends grpc.ServiceDefinition<grpc.UntypedServiceImp
interface IContextsService_ISetCurrent extends grpc.MethodDefinition<contexts_v1_contexts_pb.SetCurrentRequest, contexts_v1_contexts_pb.SetCurrentResponse> {
path: string; // "/com.docker.api.protos.context.v1.Contexts/SetCurrent"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentRequest>;
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.SetCurrentRequest>;
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentResponse>;
@ -24,8 +24,8 @@ interface IContextsService_ISetCurrent extends grpc.MethodDefinition<contexts_v1
}
interface IContextsService_IList extends grpc.MethodDefinition<contexts_v1_contexts_pb.ListRequest, contexts_v1_contexts_pb.ListResponse> {
path: string; // "/com.docker.api.protos.context.v1.Contexts/List"
requestStream: boolean; // false
responseStream: boolean; // false
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.ListRequest>;
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.ListRequest>;
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.ListResponse>;

Просмотреть файл

@ -2,30 +2,19 @@
// Original file comments:
//
// Copyright (c) 2020 Docker Inc.
// Copyright 2020 Docker, Inc.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// http://www.apache.org/licenses/LICENSE-2.0
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');

Просмотреть файл

@ -1,3 +1,18 @@
//
// Copyright 2020 Docker, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package com.docker.api.protos.streams.v1;

4
src/protos/streams/v1/streams_grpc_pb.d.ts поставляемый
Просмотреть файл

@ -15,8 +15,8 @@ interface IStreamingService extends grpc.ServiceDefinition<grpc.UntypedServiceIm
interface IStreamingService_INewStream extends grpc.MethodDefinition<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any> {
path: string; // "/com.docker.api.protos.streams.v1.Streaming/NewStream"
requestStream: boolean; // true
responseStream: boolean; // true
requestStream: true;
responseStream: true;
requestSerialize: grpc.serialize<google_protobuf_any_pb.Any>;
requestDeserialize: grpc.deserialize<google_protobuf_any_pb.Any>;
responseSerialize: grpc.serialize<google_protobuf_any_pb.Any>;

Просмотреть файл

@ -1,5 +1,21 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
//
// Copyright 2020 Docker, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('@grpc/grpc-js');
var streams_v1_streams_pb = require('../../streams/v1/streams_pb.js');

37
test/context-ls.test.ts Normal file
Просмотреть файл

@ -0,0 +1,37 @@
const fs = require('fs');
const path = require('path');
const { spawn } = require('child_process');
import { Contexts } from '../dist';
import { ListRequest, ListResponse } from '../dist/contexts';
import { ServiceError } from '@grpc/grpc-js';
describe('SDK', () => {
let proc;
let cli = path.resolve('docker-linux-amd64');
if (!fs.existsSync(cli)) {
cli = 'docker';
}
const address = 'unix:///tmp/test.sock';
beforeAll(() => {
proc = spawn(cli, ['serve', '--address', address]);
});
afterAll(() => {
proc.kill('SIGINT');
});
it('can call the backend', (done) => {
const client = new Contexts(address);
client.list(
new ListRequest(),
(error: ServiceError, response: ListResponse) => {
expect(error).toBeNull();
expect(response.getContextsList().length).toBeGreaterThan(0);
done();
}
);
});
});

Просмотреть файл

@ -1,38 +0,0 @@
const fs = require('fs');
const path = require('path');
const { spawn, spawnSync } = require('child_process');
const { ServiceError } = require('@grpc/grpc-js');
const { Containers } = require('../src');
const { ListRequest, ListResponse } = require('../src/containers');
describe('SDK', () => {
let proc;
let cli = path.resolve('docker-linux-amd64');
if (!fs.existsSync(cli)) {
cli = 'docker';
}
const address = 'unix:///tmp/test.sock';
beforeAll(() => {
proc = spawn(cli, ['serve', '--address', address]);
spawnSync(cli, ['context', 'create', 'example', 'example']);
spawnSync(cli, ['context', 'use', 'example']);
});
afterAll(() => {
proc.kill('SIGINT');
});
it('can call the backend', (done) => {
const client = new Containers(address);
client.list(new ListRequest(), (error, response) => {
expect(error).toBeNull();
expect(response.getContainersList().length).toEqual(2);
done();
});
});
});

1540
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу