@zilliz/milvus2-sdk-node 2.3.5 → 2.4.0
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/README.md +154 -35
- package/dist/milvus/HttpClient.d.ts +165 -2
- package/dist/milvus/HttpClient.js +17 -3
- package/dist/milvus/HttpClient.js.map +1 -1
- package/dist/milvus/MilvusClient.d.ts +3 -3
- package/dist/milvus/MilvusClient.js +42 -8
- package/dist/milvus/MilvusClient.js.map +1 -1
- package/dist/milvus/const/client.d.ts +4 -3
- package/dist/milvus/const/client.js +4 -3
- package/dist/milvus/const/client.js.map +1 -1
- package/dist/milvus/const/defaults.d.ts +5 -4
- package/dist/milvus/const/defaults.js +14 -13
- package/dist/milvus/const/defaults.js.map +1 -1
- package/dist/milvus/const/error.js +1 -1
- package/dist/milvus/const/error.js.map +1 -1
- package/dist/milvus/const/milvus.d.ts +47 -8
- package/dist/milvus/const/milvus.js +42 -3
- package/dist/milvus/const/milvus.js.map +1 -1
- package/dist/milvus/grpc/BaseClient.d.ts +11 -9
- package/dist/milvus/grpc/BaseClient.js +59 -21
- package/dist/milvus/grpc/BaseClient.js.map +1 -1
- package/dist/milvus/grpc/Collection.d.ts +311 -366
- package/dist/milvus/grpc/Collection.js +355 -387
- package/dist/milvus/grpc/Collection.js.map +1 -1
- package/dist/milvus/grpc/Data.d.ts +244 -291
- package/dist/milvus/grpc/Data.js +402 -539
- package/dist/milvus/grpc/Data.js.map +1 -1
- package/dist/milvus/grpc/Database.d.ts +29 -41
- package/dist/milvus/grpc/Database.js +32 -44
- package/dist/milvus/grpc/Database.js.map +1 -1
- package/dist/milvus/grpc/GrpcClient.d.ts +34 -13
- package/dist/milvus/grpc/GrpcClient.js +80 -70
- package/dist/milvus/grpc/GrpcClient.js.map +1 -1
- package/dist/milvus/grpc/MilvusIndex.d.ts +127 -67
- package/dist/milvus/grpc/MilvusIndex.js +166 -70
- package/dist/milvus/grpc/MilvusIndex.js.map +1 -1
- package/dist/milvus/grpc/Partition.d.ts +78 -113
- package/dist/milvus/grpc/Partition.js +109 -119
- package/dist/milvus/grpc/Partition.js.map +1 -1
- package/dist/milvus/grpc/Resource.d.ts +63 -92
- package/dist/milvus/grpc/Resource.js +69 -98
- package/dist/milvus/grpc/Resource.js.map +1 -1
- package/dist/milvus/grpc/User.d.ts +263 -295
- package/dist/milvus/grpc/User.js +287 -310
- package/dist/milvus/grpc/User.js.map +1 -1
- package/dist/milvus/http/Alias.d.ts +37 -0
- package/dist/milvus/http/Alias.js +62 -0
- package/dist/milvus/http/Alias.js.map +1 -0
- package/dist/milvus/http/Collection.d.ts +15 -1
- package/dist/milvus/http/Collection.js +55 -9
- package/dist/milvus/http/Collection.js.map +1 -1
- package/dist/milvus/http/Import.d.ts +33 -0
- package/dist/milvus/http/Import.js +48 -0
- package/dist/milvus/http/Import.js.map +1 -0
- package/dist/milvus/http/MilvusIndex.d.ts +35 -0
- package/dist/milvus/http/MilvusIndex.js +55 -0
- package/dist/milvus/http/MilvusIndex.js.map +1 -0
- package/dist/milvus/http/Partition.d.ts +41 -0
- package/dist/milvus/http/Partition.js +76 -0
- package/dist/milvus/http/Partition.js.map +1 -0
- package/dist/milvus/http/Role.d.ts +39 -0
- package/dist/milvus/http/Role.js +69 -0
- package/dist/milvus/http/Role.js.map +1 -0
- package/dist/milvus/http/User.d.ts +41 -0
- package/dist/milvus/http/User.js +76 -0
- package/dist/milvus/http/User.js.map +1 -0
- package/dist/milvus/http/Vector.d.ts +5 -3
- package/dist/milvus/http/Vector.js +10 -7
- package/dist/milvus/http/Vector.js.map +1 -1
- package/dist/milvus/http/index.d.ts +6 -0
- package/dist/milvus/http/index.js +6 -0
- package/dist/milvus/http/index.js.map +1 -1
- package/dist/milvus/index.d.ts +0 -1
- package/dist/milvus/index.js +0 -1
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Client.d.ts +5 -0
- package/dist/milvus/types/Collection.d.ts +34 -9
- package/dist/milvus/types/Common.d.ts +1 -3
- package/dist/milvus/types/Data.d.ts +79 -23
- package/dist/milvus/types/Data.js +1 -0
- package/dist/milvus/types/Data.js.map +1 -1
- package/dist/milvus/types/HighLevel.d.ts +6 -3
- package/dist/milvus/types/Http.d.ts +191 -9
- package/dist/milvus/types/MilvusIndex.d.ts +17 -3
- package/dist/milvus/utils/Bytes.d.ts +84 -0
- package/dist/milvus/utils/Bytes.js +261 -0
- package/dist/milvus/utils/Bytes.js.map +1 -0
- package/dist/milvus/utils/Format.d.ts +126 -68
- package/dist/milvus/utils/Format.js +375 -94
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Function.d.ts +4 -2
- package/dist/milvus/utils/Function.js +58 -25
- package/dist/milvus/utils/Function.js.map +1 -1
- package/dist/milvus/utils/Grpc.d.ts +3 -2
- package/dist/milvus/utils/Grpc.js +65 -98
- package/dist/milvus/utils/Grpc.js.map +1 -1
- package/dist/milvus/utils/Validate.d.ts +18 -3
- package/dist/milvus/utils/Validate.js +38 -12
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/milvus/utils/index.d.ts +1 -1
- package/dist/milvus/utils/index.js +1 -1
- package/dist/milvus/utils/index.js.map +1 -1
- package/dist/proto/proto/common.proto +26 -1
- package/dist/proto/proto/google/protobuf/descriptor.proto +90 -28
- package/dist/proto/proto/milvus.proto +168 -2
- package/dist/proto/proto/rg.proto +28 -0
- package/dist/proto/proto/schema.proto +34 -0
- package/dist/sdk.json +1 -1
- package/package.json +8 -5
- package/dist/milvus/OrmClient.d.ts +0 -19
- package/dist/milvus/OrmClient.js +0 -51
- package/dist/milvus/OrmClient.js.map +0 -1
- package/dist/milvus/orm/Collection.d.ts +0 -43
- package/dist/milvus/orm/Collection.js +0 -165
- package/dist/milvus/orm/Collection.js.map +0 -1
- package/dist/milvus/orm/index.d.ts +0 -1
- package/dist/milvus/orm/index.js +0 -18
- package/dist/milvus/orm/index.js.map +0 -1
- package/dist/milvus/utils/Blob.d.ts +0 -4
- package/dist/milvus/utils/Blob.js +0 -18
- package/dist/milvus/utils/Blob.js.map +0 -1
|
@@ -2,22 +2,17 @@ import { Partition } from './Partition';
|
|
|
2
2
|
import { ResStatus, GrpcTimeOut, CreateResourceGroupReq, DropResourceGroupsReq, ListResourceGroupsResponse, DescribeResourceGroupsReq, DescribeResourceGroupResponse, TransferNodeReq, TransferReplicaReq } from '../';
|
|
3
3
|
export declare class Resource extends Partition {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Creates a resource group.
|
|
6
6
|
*
|
|
7
|
-
* @param data
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* | resource_group | String | Resource group name |
|
|
11
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
7
|
+
* @param {Object} data - The data for the resource group.
|
|
8
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
9
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
12
10
|
*
|
|
13
|
-
* @returns
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* | status.error_code | string | error code |
|
|
17
|
-
* | status.reason | string | error reason |
|
|
18
|
-
*
|
|
19
|
-
* #### Example
|
|
11
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
12
|
+
* @returns {string} status.error_code - The error code.
|
|
13
|
+
* @returns {string} status.reason - The error reason.
|
|
20
14
|
*
|
|
15
|
+
* @example
|
|
21
16
|
* ```
|
|
22
17
|
* new milvusClient(MILUVS_ADDRESS).createResourceGroup({
|
|
23
18
|
* resource_group: "vector_01",
|
|
@@ -26,18 +21,16 @@ export declare class Resource extends Partition {
|
|
|
26
21
|
*/
|
|
27
22
|
createResourceGroup(data: CreateResourceGroupReq): Promise<ResStatus>;
|
|
28
23
|
/**
|
|
29
|
-
*
|
|
24
|
+
* Lists all resource groups.
|
|
30
25
|
*
|
|
31
|
-
* @
|
|
32
|
-
* | Property | Type | Description |
|
|
33
|
-
* | :-- | :-- | :-- |
|
|
34
|
-
* | status.error_code | string | error code |
|
|
35
|
-
* | status.reason | string | error reason |
|
|
36
|
-
* | resource_groups | string[] | Resource group string array |
|
|
37
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
26
|
+
* @param {GrpcTimeOut} data - An optional object containing a timeout duration in milliseconds for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
38
27
|
*
|
|
39
|
-
*
|
|
28
|
+
* @returns {Promise<ListResourceGroupsResponse>} A promise that resolves to the response status.
|
|
29
|
+
* @returns {string} status.error_code - The error code.
|
|
30
|
+
* @returns {string} status.reason - The error reason.
|
|
31
|
+
* @returns {string[]} resource_groups - An array of resource group names.
|
|
40
32
|
*
|
|
33
|
+
* @example
|
|
41
34
|
* ```
|
|
42
35
|
* new milvusClient(MILUVS_ADDRESS).listResourceGroups();
|
|
43
36
|
* ```
|
|
@@ -46,48 +39,39 @@ export declare class Resource extends Partition {
|
|
|
46
39
|
/**
|
|
47
40
|
* Describe a resource group.
|
|
48
41
|
*
|
|
49
|
-
* @param data
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @returns
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* | resource_group.num_available_node | number | available node_num, some node may shutdown |
|
|
62
|
-
* | resource_group.num_loaded_replica | { [key: string]: number } | from collection_name to loaded replica of each collecion in this rg |
|
|
63
|
-
* | resource_group.num_outgoing_node | { [key: string]: number } | from collection_name to outgoging accessed node num by replica loaded in this rg |
|
|
64
|
-
* | resource_group.num_incoming_node | { [key: string]: number } | from collection_name to incoming accessed node num by replica loaded in other rg |
|
|
65
|
-
*
|
|
66
|
-
* #### Example
|
|
42
|
+
* @param {Object} data - The data for the resource group.
|
|
43
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
44
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
45
|
+
*
|
|
46
|
+
* @returns {Promise<DescribeResourceGroupResponse>} A promise that resolves to the response status.
|
|
47
|
+
* @returns {string} status.error_code - The error code.
|
|
48
|
+
* @returns {string} status.reason - The error reason.
|
|
49
|
+
* @returns {number} resource_group.capacity - The number of nodes which have been transferred to this resource group.
|
|
50
|
+
* @returns {number} resource_group.num_available_node - The number of available nodes, some nodes may be shutdown.
|
|
51
|
+
* @returns {{ [key: string]: number }} resource_group.num_loaded_replica - A map from collection name to the number of loaded replicas of each collection in this resource group.
|
|
52
|
+
* @returns {{ [key: string]: number }} resource_group.num_outgoing_node - A map from collection name to the number of outgoing accessed nodes by replicas loaded in this resource group.
|
|
53
|
+
* @returns {{ [key: string]: number }} resource_group.num_incoming_node - A map from collection name to the number of incoming accessed nodes by replicas loaded in other resource groups.
|
|
67
54
|
*
|
|
55
|
+
* @example
|
|
68
56
|
* ```
|
|
69
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
57
|
+
* new milvusClient(MILUVS_ADDRESS).describeResourceGroup({
|
|
70
58
|
* resource_group: 'my-resource-group'
|
|
71
59
|
* });
|
|
72
60
|
* ```
|
|
73
61
|
*/
|
|
74
62
|
describeResourceGroup(data: DescribeResourceGroupsReq): Promise<DescribeResourceGroupResponse>;
|
|
75
63
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @param data
|
|
78
|
-
* | Property | Type | Description |
|
|
79
|
-
* | :--- | :-- | :-- |
|
|
80
|
-
* | resource_group | String | Resource group name |
|
|
81
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
64
|
+
* Drops a resource group.
|
|
82
65
|
*
|
|
83
|
-
* @
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* | status.error_code | string | error code |
|
|
87
|
-
* | status.reason | string | error reason |
|
|
66
|
+
* @param {Object} data - The data for the resource group.
|
|
67
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
68
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
88
69
|
*
|
|
89
|
-
*
|
|
70
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
71
|
+
* @returns {string} status.error_code - The error code.
|
|
72
|
+
* @returns {string} status.reason - The error reason.
|
|
90
73
|
*
|
|
74
|
+
* @example
|
|
91
75
|
* ```
|
|
92
76
|
* new milvusClient(MILUVS_ADDRESS).dropResourceGroup({
|
|
93
77
|
* resource_group: 'my-resource-group'
|
|
@@ -96,25 +80,20 @@ export declare class Resource extends Partition {
|
|
|
96
80
|
*/
|
|
97
81
|
dropResourceGroup(data: DropResourceGroupsReq): Promise<ResStatus>;
|
|
98
82
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @param data
|
|
101
|
-
* | Property | Type | Description |
|
|
102
|
-
* | :--- | :-- | :-- |
|
|
103
|
-
* | source_resource_group | String | source resource group name |
|
|
104
|
-
* | target_resource_group | String | target resource group name |
|
|
105
|
-
* | collection_name | String | collection name |
|
|
106
|
-
* | num_replica | Number | number of replicas to transfer |
|
|
107
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
108
|
-
*
|
|
109
|
-
* @returns
|
|
110
|
-
* | Property | Type | Description |
|
|
111
|
-
* | :-- | :-- | :-- |
|
|
112
|
-
* | status.error_code | string | error code |
|
|
113
|
-
* | status.reason | string | error reason |
|
|
83
|
+
* Transfers nodes from one resource group to another.
|
|
114
84
|
*
|
|
85
|
+
* @param {Object} data - The data for the resource group.
|
|
86
|
+
* @param {string} data.source_resource_group - The name of the source resource group.
|
|
87
|
+
* @param {string} data.target_resource_group - The name of the target resource group.
|
|
88
|
+
* @param {string} data.collection_name - The name of the collection.
|
|
89
|
+
* @param {number} data.num_replica - The number of replicas to transfer.
|
|
90
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
115
91
|
*
|
|
116
|
-
*
|
|
92
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
93
|
+
* @returns {string} status.error_code - The error code.
|
|
94
|
+
* @returns {string} status.reason - The error reason.
|
|
117
95
|
*
|
|
96
|
+
* @example
|
|
118
97
|
* ```
|
|
119
98
|
* new milvusClient(MILUVS_ADDRESS).transferNode({
|
|
120
99
|
* source_resource_group: 'source-resource-group',
|
|
@@ -126,24 +105,19 @@ export declare class Resource extends Partition {
|
|
|
126
105
|
*/
|
|
127
106
|
transferReplica(data: TransferReplicaReq): Promise<ResStatus>;
|
|
128
107
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @param data
|
|
131
|
-
* | Property | Type | Description |
|
|
132
|
-
* | :--- | :-- | :-- |
|
|
133
|
-
* | source_resource_group | String | source resource group name |
|
|
134
|
-
* | target_resource_group | String | target resource group name |
|
|
135
|
-
* | num_node | Number | number of nodes to transfer |
|
|
136
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
108
|
+
* Transfers nodes from one resource group to another.
|
|
137
109
|
*
|
|
138
|
-
* @
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
110
|
+
* @param {Object} data - The data for the resource group.
|
|
111
|
+
* @param {string} data.source_resource_group - The name of the source resource group.
|
|
112
|
+
* @param {string} data.target_resource_group - The name of the target resource group.
|
|
113
|
+
* @param {number} data.num_node - The number of nodes to transfer.
|
|
114
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
143
115
|
*
|
|
116
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
117
|
+
* @returns {string} status.error_code - The error code.
|
|
118
|
+
* @returns {string} status.reason - The error reason.
|
|
144
119
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
120
|
+
* @example
|
|
147
121
|
* ```
|
|
148
122
|
* new milvusClient(MILUVS_ADDRESS).transferNode({
|
|
149
123
|
* source_resource_group: 'source-resource-group',
|
|
@@ -154,16 +128,13 @@ export declare class Resource extends Partition {
|
|
|
154
128
|
*/
|
|
155
129
|
transferNode(data: TransferNodeReq): Promise<ResStatus>;
|
|
156
130
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* @returns
|
|
160
|
-
* | Property | Type | Description |
|
|
161
|
-
* | :-- | :-- | :-- |
|
|
162
|
-
* | status.error_code | string | error code |
|
|
163
|
-
* | status.reason | string[] | error reason |
|
|
131
|
+
* Drops all resource groups, transfers all nodes to the default group.
|
|
164
132
|
*
|
|
165
|
-
*
|
|
133
|
+
* @returns {Promise<ResStatus[]>} A promise that resolves to an array of response statuses, each containing:
|
|
134
|
+
* @returns {string} status.error_code - The error code.
|
|
135
|
+
* @returns {string[]} status.reason - The error reason.
|
|
166
136
|
*
|
|
137
|
+
* @example
|
|
167
138
|
* ```
|
|
168
139
|
* new milvusClient(MILUVS_ADDRESS).dropResourceGroups();
|
|
169
140
|
* ```
|
|
@@ -14,22 +14,17 @@ const Partition_1 = require("./Partition");
|
|
|
14
14
|
const __1 = require("../");
|
|
15
15
|
class Resource extends Partition_1.Partition {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Creates a resource group.
|
|
18
18
|
*
|
|
19
|
-
* @param data
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* | resource_group | String | Resource group name |
|
|
23
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
19
|
+
* @param {Object} data - The data for the resource group.
|
|
20
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
21
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
24
22
|
*
|
|
25
|
-
* @returns
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* | status.error_code | string | error code |
|
|
29
|
-
* | status.reason | string | error reason |
|
|
30
|
-
*
|
|
31
|
-
* #### Example
|
|
23
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
24
|
+
* @returns {string} status.error_code - The error code.
|
|
25
|
+
* @returns {string} status.reason - The error reason.
|
|
32
26
|
*
|
|
27
|
+
* @example
|
|
33
28
|
* ```
|
|
34
29
|
* new milvusClient(MILUVS_ADDRESS).createResourceGroup({
|
|
35
30
|
* resource_group: "vector_01",
|
|
@@ -38,83 +33,72 @@ class Resource extends Partition_1.Partition {
|
|
|
38
33
|
*/
|
|
39
34
|
createResourceGroup(data) {
|
|
40
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const promise = yield (0, __1.promisify)(this.
|
|
36
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'CreateResourceGroup', data, data.timeout || this.timeout);
|
|
42
37
|
return promise;
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
40
|
/**
|
|
46
|
-
*
|
|
41
|
+
* Lists all resource groups.
|
|
47
42
|
*
|
|
48
|
-
* @
|
|
49
|
-
* | Property | Type | Description |
|
|
50
|
-
* | :-- | :-- | :-- |
|
|
51
|
-
* | status.error_code | string | error code |
|
|
52
|
-
* | status.reason | string | error reason |
|
|
53
|
-
* | resource_groups | string[] | Resource group string array |
|
|
54
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
43
|
+
* @param {GrpcTimeOut} data - An optional object containing a timeout duration in milliseconds for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
55
44
|
*
|
|
56
|
-
*
|
|
45
|
+
* @returns {Promise<ListResourceGroupsResponse>} A promise that resolves to the response status.
|
|
46
|
+
* @returns {string} status.error_code - The error code.
|
|
47
|
+
* @returns {string} status.reason - The error reason.
|
|
48
|
+
* @returns {string[]} resource_groups - An array of resource group names.
|
|
57
49
|
*
|
|
50
|
+
* @example
|
|
58
51
|
* ```
|
|
59
52
|
* new milvusClient(MILUVS_ADDRESS).listResourceGroups();
|
|
60
53
|
* ```
|
|
61
54
|
*/
|
|
62
55
|
listResourceGroups(data) {
|
|
63
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const promise = yield (0, __1.promisify)(this.
|
|
57
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'ListResourceGroups', {}, (data === null || data === void 0 ? void 0 : data.timeout) || this.timeout);
|
|
65
58
|
return promise;
|
|
66
59
|
});
|
|
67
60
|
}
|
|
68
61
|
/**
|
|
69
62
|
* Describe a resource group.
|
|
70
63
|
*
|
|
71
|
-
* @param data
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* @returns
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* | resource_group.num_available_node | number | available node_num, some node may shutdown |
|
|
84
|
-
* | resource_group.num_loaded_replica | { [key: string]: number } | from collection_name to loaded replica of each collecion in this rg |
|
|
85
|
-
* | resource_group.num_outgoing_node | { [key: string]: number } | from collection_name to outgoging accessed node num by replica loaded in this rg |
|
|
86
|
-
* | resource_group.num_incoming_node | { [key: string]: number } | from collection_name to incoming accessed node num by replica loaded in other rg |
|
|
87
|
-
*
|
|
88
|
-
* #### Example
|
|
64
|
+
* @param {Object} data - The data for the resource group.
|
|
65
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
66
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
67
|
+
*
|
|
68
|
+
* @returns {Promise<DescribeResourceGroupResponse>} A promise that resolves to the response status.
|
|
69
|
+
* @returns {string} status.error_code - The error code.
|
|
70
|
+
* @returns {string} status.reason - The error reason.
|
|
71
|
+
* @returns {number} resource_group.capacity - The number of nodes which have been transferred to this resource group.
|
|
72
|
+
* @returns {number} resource_group.num_available_node - The number of available nodes, some nodes may be shutdown.
|
|
73
|
+
* @returns {{ [key: string]: number }} resource_group.num_loaded_replica - A map from collection name to the number of loaded replicas of each collection in this resource group.
|
|
74
|
+
* @returns {{ [key: string]: number }} resource_group.num_outgoing_node - A map from collection name to the number of outgoing accessed nodes by replicas loaded in this resource group.
|
|
75
|
+
* @returns {{ [key: string]: number }} resource_group.num_incoming_node - A map from collection name to the number of incoming accessed nodes by replicas loaded in other resource groups.
|
|
89
76
|
*
|
|
77
|
+
* @example
|
|
90
78
|
* ```
|
|
91
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
79
|
+
* new milvusClient(MILUVS_ADDRESS).describeResourceGroup({
|
|
92
80
|
* resource_group: 'my-resource-group'
|
|
93
81
|
* });
|
|
94
82
|
* ```
|
|
95
83
|
*/
|
|
96
84
|
describeResourceGroup(data) {
|
|
97
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const promise = yield (0, __1.promisify)(this.
|
|
86
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'DescribeResourceGroup', data, data.timeout || this.timeout);
|
|
99
87
|
return promise;
|
|
100
88
|
});
|
|
101
89
|
}
|
|
102
90
|
/**
|
|
103
|
-
*
|
|
104
|
-
* @param data
|
|
105
|
-
* | Property | Type | Description |
|
|
106
|
-
* | :--- | :-- | :-- |
|
|
107
|
-
* | resource_group | String | Resource group name |
|
|
108
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
91
|
+
* Drops a resource group.
|
|
109
92
|
*
|
|
110
|
-
* @
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* | status.error_code | string | error code |
|
|
114
|
-
* | status.reason | string | error reason |
|
|
93
|
+
* @param {Object} data - The data for the resource group.
|
|
94
|
+
* @param {string} data.resource_group - The name of the resource group.
|
|
95
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
115
96
|
*
|
|
116
|
-
*
|
|
97
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
98
|
+
* @returns {string} status.error_code - The error code.
|
|
99
|
+
* @returns {string} status.reason - The error reason.
|
|
117
100
|
*
|
|
101
|
+
* @example
|
|
118
102
|
* ```
|
|
119
103
|
* new milvusClient(MILUVS_ADDRESS).dropResourceGroup({
|
|
120
104
|
* resource_group: 'my-resource-group'
|
|
@@ -123,30 +107,25 @@ class Resource extends Partition_1.Partition {
|
|
|
123
107
|
*/
|
|
124
108
|
dropResourceGroup(data) {
|
|
125
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
const promise = yield (0, __1.promisify)(this.
|
|
110
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'DropResourceGroup', data, data.timeout || this.timeout);
|
|
127
111
|
return promise;
|
|
128
112
|
});
|
|
129
113
|
}
|
|
130
114
|
/**
|
|
131
|
-
*
|
|
132
|
-
* @param data
|
|
133
|
-
* | Property | Type | Description |
|
|
134
|
-
* | :--- | :-- | :-- |
|
|
135
|
-
* | source_resource_group | String | source resource group name |
|
|
136
|
-
* | target_resource_group | String | target resource group name |
|
|
137
|
-
* | collection_name | String | collection name |
|
|
138
|
-
* | num_replica | Number | number of replicas to transfer |
|
|
139
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
140
|
-
*
|
|
141
|
-
* @returns
|
|
142
|
-
* | Property | Type | Description |
|
|
143
|
-
* | :-- | :-- | :-- |
|
|
144
|
-
* | status.error_code | string | error code |
|
|
145
|
-
* | status.reason | string | error reason |
|
|
115
|
+
* Transfers nodes from one resource group to another.
|
|
146
116
|
*
|
|
117
|
+
* @param {Object} data - The data for the resource group.
|
|
118
|
+
* @param {string} data.source_resource_group - The name of the source resource group.
|
|
119
|
+
* @param {string} data.target_resource_group - The name of the target resource group.
|
|
120
|
+
* @param {string} data.collection_name - The name of the collection.
|
|
121
|
+
* @param {number} data.num_replica - The number of replicas to transfer.
|
|
122
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
147
123
|
*
|
|
148
|
-
*
|
|
124
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
125
|
+
* @returns {string} status.error_code - The error code.
|
|
126
|
+
* @returns {string} status.reason - The error reason.
|
|
149
127
|
*
|
|
128
|
+
* @example
|
|
150
129
|
* ```
|
|
151
130
|
* new milvusClient(MILUVS_ADDRESS).transferNode({
|
|
152
131
|
* source_resource_group: 'source-resource-group',
|
|
@@ -159,29 +138,24 @@ class Resource extends Partition_1.Partition {
|
|
|
159
138
|
/* istanbul ignore next */
|
|
160
139
|
transferReplica(data) {
|
|
161
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
const promise = yield (0, __1.promisify)(this.
|
|
141
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'TransferReplica', data, data.timeout || this.timeout);
|
|
163
142
|
return promise;
|
|
164
143
|
});
|
|
165
144
|
}
|
|
166
145
|
/**
|
|
167
|
-
*
|
|
168
|
-
* @param data
|
|
169
|
-
* | Property | Type | Description |
|
|
170
|
-
* | :--- | :-- | :-- |
|
|
171
|
-
* | source_resource_group | String | source resource group name |
|
|
172
|
-
* | target_resource_group | String | target resource group name |
|
|
173
|
-
* | num_node | Number | number of nodes to transfer |
|
|
174
|
-
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
146
|
+
* Transfers nodes from one resource group to another.
|
|
175
147
|
*
|
|
176
|
-
* @
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
148
|
+
* @param {Object} data - The data for the resource group.
|
|
149
|
+
* @param {string} data.source_resource_group - The name of the source resource group.
|
|
150
|
+
* @param {string} data.target_resource_group - The name of the target resource group.
|
|
151
|
+
* @param {number} data.num_node - The number of nodes to transfer.
|
|
152
|
+
* @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or an error occurs. Default is undefined.
|
|
181
153
|
*
|
|
154
|
+
* @returns {Promise<ResStatus>} A promise that resolves to the response status.
|
|
155
|
+
* @returns {string} status.error_code - The error code.
|
|
156
|
+
* @returns {string} status.reason - The error reason.
|
|
182
157
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
158
|
+
* @example
|
|
185
159
|
* ```
|
|
186
160
|
* new milvusClient(MILUVS_ADDRESS).transferNode({
|
|
187
161
|
* source_resource_group: 'source-resource-group',
|
|
@@ -193,21 +167,18 @@ class Resource extends Partition_1.Partition {
|
|
|
193
167
|
/* istanbul ignore next */
|
|
194
168
|
transferNode(data) {
|
|
195
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
const promise = yield (0, __1.promisify)(this.
|
|
170
|
+
const promise = yield (0, __1.promisify)(this.channelPool, 'TransferNode', data, data.timeout || this.timeout);
|
|
197
171
|
return promise;
|
|
198
172
|
});
|
|
199
173
|
}
|
|
200
174
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* @returns
|
|
204
|
-
* | Property | Type | Description |
|
|
205
|
-
* | :-- | :-- | :-- |
|
|
206
|
-
* | status.error_code | string | error code |
|
|
207
|
-
* | status.reason | string[] | error reason |
|
|
175
|
+
* Drops all resource groups, transfers all nodes to the default group.
|
|
208
176
|
*
|
|
209
|
-
*
|
|
177
|
+
* @returns {Promise<ResStatus[]>} A promise that resolves to an array of response statuses, each containing:
|
|
178
|
+
* @returns {string} status.error_code - The error code.
|
|
179
|
+
* @returns {string[]} status.reason - The error reason.
|
|
210
180
|
*
|
|
181
|
+
* @example
|
|
211
182
|
* ```
|
|
212
183
|
* new milvusClient(MILUVS_ADDRESS).dropResourceGroups();
|
|
213
184
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../../milvus/grpc/Resource.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AACxC,2BAYa;AAEb,MAAa,QAAS,SAAQ,qBAAS;IACrC
|
|
1
|
+
{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../../milvus/grpc/Resource.ts"],"names":[],"mappings":"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"}
|