@aneoconsultingfr/armonik.api
Version:
gRPC API to interact with ArmoniK built for the web
36 lines (33 loc) • 1.24 kB
JavaScript
import {
GetPartitionRequest,
GetPartitionResponse,
ListPartitionsRequest,
ListPartitionsResponse
} from "./chunk-LK7AJSJ6.mjs";
// src/generated/partitions_service.ts
import _m0 from "protobufjs/minimal.js";
var protobufPackage = "armonik.api.grpc.v1.partitions";
var PartitionsServiceName = "armonik.api.grpc.v1.partitions.Partitions";
var PartitionsClientImpl = class {
constructor(rpc, opts) {
this.service = (opts == null ? void 0 : opts.service) || PartitionsServiceName;
this.rpc = rpc;
this.ListPartitions = this.ListPartitions.bind(this);
this.GetPartition = this.GetPartition.bind(this);
}
ListPartitions(request) {
const data = ListPartitionsRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "ListPartitions", data);
return promise.then((data2) => ListPartitionsResponse.decode(_m0.Reader.create(data2)));
}
GetPartition(request) {
const data = GetPartitionRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "GetPartition", data);
return promise.then((data2) => GetPartitionResponse.decode(_m0.Reader.create(data2)));
}
};
export {
protobufPackage,
PartitionsServiceName,
PartitionsClientImpl
};