UNPKG

@azure/event-hubs

Version:
41 lines (40 loc) 1.74 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var unbalancedStrategy_exports = {}; __export(unbalancedStrategy_exports, { UnbalancedLoadBalancingStrategy: () => UnbalancedLoadBalancingStrategy }); module.exports = __toCommonJS(unbalancedStrategy_exports); class UnbalancedLoadBalancingStrategy { /** * Implements load balancing by taking into account current ownership and * the full set of partitions in the Event Hub. * @param _ourOwnerId - The id we should assume is _our_ id when checking for ownership. * @param _claimedPartitionOwnershipMap - The current claimed ownerships for partitions. * @param partitionIds - Partitions to assign owners to. * @returns Partition ids to claim. */ getPartitionsToClaim(_ourOwnerId, _claimedPartitionOwnershipMap, partitionIds) { return partitionIds; } } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { UnbalancedLoadBalancingStrategy }); //# sourceMappingURL=unbalancedStrategy.js.map