kuzzle 2.60.1 → 2.61.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lib/cluster/idCardHandler.d.ts +11 -1
- package/dist/lib/cluster/idCardHandler.js +10 -2
- package/dist/lib/cluster/node.d.ts +14 -0
- package/dist/lib/cluster/node.js +19 -0
- package/dist/lib/core/backend/backendStorage.js +4 -6
- package/dist/lib/core/plugin/pluginContext.js +2 -2
- package/dist/lib/core/storage/clientAdapter.d.ts +13 -10
- package/dist/lib/core/storage/clientAdapter.js +112 -60
- package/dist/lib/core/storage/conformance/capabilityCases.d.ts +3 -0
- package/dist/lib/core/storage/conformance/capabilityCases.js +121 -0
- package/dist/lib/core/storage/conformance/conformanceContext.d.ts +33 -0
- package/dist/lib/core/storage/conformance/conformanceContext.js +97 -0
- package/dist/lib/core/storage/conformance/conformanceEnvironment.d.ts +7 -0
- package/dist/lib/core/storage/conformance/conformanceEnvironment.js +136 -0
- package/dist/lib/core/storage/conformance/coreCases.d.ts +3 -0
- package/dist/lib/core/storage/conformance/coreCases.js +381 -0
- package/dist/lib/core/storage/conformance/storageDriverConformance.d.ts +53 -0
- package/dist/lib/core/storage/conformance/storageDriverConformance.js +89 -0
- package/dist/lib/core/storage/indexCache.d.ts +26 -2
- package/dist/lib/core/storage/indexCache.js +100 -2
- package/dist/lib/core/storage/storageDriverLoader.d.ts +41 -0
- package/dist/lib/core/storage/storageDriverLoader.js +276 -0
- package/dist/lib/core/storage/storageEngine.js +5 -1
- package/dist/lib/core/storage/storageError.d.ts +15 -0
- package/dist/lib/core/storage/storageError.js +36 -0
- package/dist/lib/kerror/codes/1-services.json +35 -0
- package/dist/lib/kerror/codes/8-cluster.json +6 -0
- package/dist/lib/service/storage/7/elasticsearch.d.ts +5 -1
- package/dist/lib/service/storage/builtInDrivers.d.ts +17 -0
- package/dist/lib/service/storage/builtInDrivers.js +61 -0
- package/dist/lib/service/storage/storageService.d.ts +13 -0
- package/dist/lib/service/storage/storageService.js +44 -0
- package/dist/lib/types/config/storageEngine/StorageEngineElasticsearchConfiguration.d.ts +8 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/index.js +1 -0
- package/dist/lib/types/storage/StorageDriver.d.ts +306 -0
- package/dist/lib/types/storage/StorageDriver.js +41 -0
- package/dist/package.json +2 -1
- package/package.json +2 -1
- package/dist/lib/service/storage/Elasticsearch.d.ts +0 -16
- package/dist/lib/service/storage/Elasticsearch.js +0 -48
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Client as ClientES7 } from "sdk-es7";
|
|
2
|
-
import { Client as ClientES8 } from "sdk-es8";
|
|
3
|
-
import { ES7 } from "./7/elasticsearch";
|
|
4
|
-
import { ES8 } from "./8/elasticsearch";
|
|
5
|
-
import Service from "../service";
|
|
6
|
-
import { storeScopeEnum } from "../../core/storage/storeScopeEnum";
|
|
7
|
-
import type { JSONObject } from "../../types/JSONObject";
|
|
8
|
-
import type { StorageEngineElasticsearch } from "../../types/config/storageEngine/StorageEngineElasticsearchConfiguration";
|
|
9
|
-
export declare class Elasticsearch extends Service<StorageEngineElasticsearch> {
|
|
10
|
-
client: ES7 | ES8;
|
|
11
|
-
private readonly logger;
|
|
12
|
-
constructor(config: StorageEngineElasticsearch, scope?: storeScopeEnum);
|
|
13
|
-
static buildClient(config: JSONObject, version?: "7" | "8"): ClientES7 | ClientES8;
|
|
14
|
-
_initSequence(): Promise<void>;
|
|
15
|
-
init(): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Elasticsearch = void 0;
|
|
7
|
-
const sdk_es7_1 = require("sdk-es7");
|
|
8
|
-
const sdk_es8_1 = require("sdk-es8");
|
|
9
|
-
const elasticsearch_1 = require("./7/elasticsearch");
|
|
10
|
-
const elasticsearch_2 = require("./8/elasticsearch");
|
|
11
|
-
const service_1 = __importDefault(require("../service"));
|
|
12
|
-
const storeScopeEnum_1 = require("../../core/storage/storeScopeEnum");
|
|
13
|
-
class Elasticsearch extends service_1.default {
|
|
14
|
-
constructor(config, scope = storeScopeEnum_1.storeScopeEnum.PUBLIC) {
|
|
15
|
-
super("elasticsearch", config);
|
|
16
|
-
this.logger = global.kuzzle.log.child("service:storage:elasticsearch");
|
|
17
|
-
if (config.majorVersion === "7") {
|
|
18
|
-
this.client = new elasticsearch_1.ES7(config, scope);
|
|
19
|
-
}
|
|
20
|
-
else if (config.majorVersion === "8") {
|
|
21
|
-
this.client = new elasticsearch_2.ES8(config, scope);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("Invalid Elasticsearch version.");
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
static buildClient(config, version) {
|
|
28
|
-
if (!version) {
|
|
29
|
-
version = "7";
|
|
30
|
-
}
|
|
31
|
-
switch (version) {
|
|
32
|
-
case "7":
|
|
33
|
-
return new sdk_es7_1.Client(config);
|
|
34
|
-
case "8":
|
|
35
|
-
return new sdk_es8_1.Client(config);
|
|
36
|
-
default:
|
|
37
|
-
throw new Error("Invalid Elasticsearch version.");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
async _initSequence() {
|
|
41
|
-
await this.client._initSequence();
|
|
42
|
-
}
|
|
43
|
-
async init() {
|
|
44
|
-
await super.init();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.Elasticsearch = Elasticsearch;
|
|
48
|
-
//# sourceMappingURL=Elasticsearch.js.map
|