xrootd 0.2.2 → 1.0.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/CHANGELOG.md +24 -0
- package/LICENSE +189 -0
- package/README.md +333 -96
- package/dist/index.d.mts +620 -821
- package/dist/index.mjs +1554 -723
- package/package.json +65 -83
- package/LICENSE-GPLv3 +0 -674
- package/LICENSE-MIT +0 -7
- package/dist/index.cjs +0 -817
- package/dist/index.d.cts +0 -864
- package/libs/darwin-arm64/libXrdCl.6.dylib +0 -0
- package/libs/darwin-arm64/libXrdCrypto.6.dylib +0 -0
- package/libs/darwin-arm64/libXrdCryptossl-6.so +0 -0
- package/libs/darwin-arm64/libXrdSec-6.so +0 -0
- package/libs/darwin-arm64/libXrdSecProt-6.so +0 -0
- package/libs/darwin-arm64/libXrdSeckrb5-6.so +0 -0
- package/libs/darwin-arm64/libXrdSecpwd-6.so +0 -0
- package/libs/darwin-arm64/libXrdSecsss-6.so +0 -0
- package/libs/darwin-arm64/libXrdSecunix-6.so +0 -0
- package/libs/darwin-arm64/libXrdSecztn-6.so +0 -0
- package/libs/darwin-arm64/libXrdUtils.6.dylib +0 -0
- package/libs/darwin-arm64/libXrdXml.6.dylib +0 -0
- package/libs/darwin-x64/libXrdCl.6.dylib +0 -0
- package/libs/darwin-x64/libXrdCrypto.6.dylib +0 -0
- package/libs/darwin-x64/libXrdCryptossl-6.so +0 -0
- package/libs/darwin-x64/libXrdSec-6.so +0 -0
- package/libs/darwin-x64/libXrdSecProt-6.so +0 -0
- package/libs/darwin-x64/libXrdSeckrb5-6.so +0 -0
- package/libs/darwin-x64/libXrdSecpwd-6.so +0 -0
- package/libs/darwin-x64/libXrdSecsss-6.so +0 -0
- package/libs/darwin-x64/libXrdSecunix-6.so +0 -0
- package/libs/darwin-x64/libXrdSecztn-6.so +0 -0
- package/libs/darwin-x64/libXrdUtils.6.dylib +0 -0
- package/libs/darwin-x64/libXrdXml.6.dylib +0 -0
- package/libs/linux-arm64/libXrdCl.so.6 +0 -0
- package/libs/linux-arm64/libXrdCrypto.so.6 +0 -0
- package/libs/linux-arm64/libXrdCryptossl-6.so +0 -0
- package/libs/linux-arm64/libXrdSec-6.so +0 -0
- package/libs/linux-arm64/libXrdSecProt-6.so +0 -0
- package/libs/linux-arm64/libXrdSeckrb5-6.so +0 -0
- package/libs/linux-arm64/libXrdSecpwd-6.so +0 -0
- package/libs/linux-arm64/libXrdSecsss-6.so +0 -0
- package/libs/linux-arm64/libXrdSecunix-6.so +0 -0
- package/libs/linux-arm64/libXrdSecztn-6.so +0 -0
- package/libs/linux-arm64/libXrdUtils.so.6 +0 -0
- package/libs/linux-arm64/libXrdXml.so.6 +0 -0
- package/libs/linux-x64/libXrdCl.so.6 +0 -0
- package/libs/linux-x64/libXrdCrypto.so.6 +0 -0
- package/libs/linux-x64/libXrdCryptossl-6.so +0 -0
- package/libs/linux-x64/libXrdSec-6.so +0 -0
- package/libs/linux-x64/libXrdSecProt-6.so +0 -0
- package/libs/linux-x64/libXrdSeckrb5-6.so +0 -0
- package/libs/linux-x64/libXrdSecpwd-6.so +0 -0
- package/libs/linux-x64/libXrdSecsss-6.so +0 -0
- package/libs/linux-x64/libXrdSecunix-6.so +0 -0
- package/libs/linux-x64/libXrdSecztn-6.so +0 -0
- package/libs/linux-x64/libXrdUtils.so.6 +0 -0
- package/libs/linux-x64/libXrdXml.so.6 +0 -0
- package/prebuilds/darwin-arm64/xrootd.node +0 -0
- package/prebuilds/darwin-x64/xrootd.node +0 -0
- package/prebuilds/linux-arm64/xrootd.node +0 -0
- package/prebuilds/linux-x64/xrootd.node +0 -0
package/dist/index.d.cts
DELETED
|
@@ -1,864 +0,0 @@
|
|
|
1
|
-
import { Readable, Writable } from "node:stream";
|
|
2
|
-
|
|
3
|
-
//#region lib/types.d.ts
|
|
4
|
-
type PropertyList = Record<string, string | number | boolean>;
|
|
5
|
-
interface IXRootDError extends Error {
|
|
6
|
-
xrdStatus: number;
|
|
7
|
-
xrdCode: number;
|
|
8
|
-
xrdErrNo: number;
|
|
9
|
-
xrdErrMsg: string;
|
|
10
|
-
}
|
|
11
|
-
type XRootDOkError = {
|
|
12
|
-
ok: true;
|
|
13
|
-
} | ({
|
|
14
|
-
ok: false;
|
|
15
|
-
} & IXRootDError);
|
|
16
|
-
type XAttrStatusResult = {
|
|
17
|
-
ok: true;
|
|
18
|
-
name: string;
|
|
19
|
-
} | ({
|
|
20
|
-
ok: false;
|
|
21
|
-
name: string;
|
|
22
|
-
} & IXRootDError);
|
|
23
|
-
interface StatInfo {
|
|
24
|
-
id: string;
|
|
25
|
-
size: bigint;
|
|
26
|
-
flags: number;
|
|
27
|
-
modTime: number;
|
|
28
|
-
accessTime: number;
|
|
29
|
-
changeTime: number;
|
|
30
|
-
modTimeAsString: string;
|
|
31
|
-
accessTimeAsString: string;
|
|
32
|
-
changeTimeAsString: string;
|
|
33
|
-
modeAsString: string;
|
|
34
|
-
modeAsOctString: string;
|
|
35
|
-
owner: string;
|
|
36
|
-
group: string;
|
|
37
|
-
checksum: string;
|
|
38
|
-
get modeOctal(): string;
|
|
39
|
-
get modeString(): string;
|
|
40
|
-
get isFile(): boolean;
|
|
41
|
-
get isDir(): boolean;
|
|
42
|
-
get isOther(): boolean;
|
|
43
|
-
get isOffline(): boolean;
|
|
44
|
-
get isPOSCPending(): boolean;
|
|
45
|
-
get isReadable(): boolean;
|
|
46
|
-
get isWritable(): boolean;
|
|
47
|
-
get isBackUpExists(): boolean;
|
|
48
|
-
}
|
|
49
|
-
interface LocationInfo {
|
|
50
|
-
address: string;
|
|
51
|
-
type: number;
|
|
52
|
-
accessType: number;
|
|
53
|
-
}
|
|
54
|
-
interface ReadChunkRequest {
|
|
55
|
-
offset: bigint | number;
|
|
56
|
-
size: number;
|
|
57
|
-
}
|
|
58
|
-
interface StatVFSInfo {
|
|
59
|
-
nodesRW: bigint;
|
|
60
|
-
freeRW: bigint;
|
|
61
|
-
utilizationRW: number;
|
|
62
|
-
nodesStaging: bigint;
|
|
63
|
-
freeStaging: bigint;
|
|
64
|
-
utilizationStaging: number;
|
|
65
|
-
}
|
|
66
|
-
interface DirListEntry {
|
|
67
|
-
name: string;
|
|
68
|
-
hostAddress: string;
|
|
69
|
-
stat: StatInfo | null;
|
|
70
|
-
}
|
|
71
|
-
declare class XRootDError extends Error {
|
|
72
|
-
code: number;
|
|
73
|
-
status: number;
|
|
74
|
-
constructor(status: XRootDOkError);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* 对应 src/core/XrdNodeFile.cc 中 Init 暴露的类
|
|
78
|
-
*/
|
|
79
|
-
interface INativeFile {
|
|
80
|
-
Open(url: string, flags: number, mode: number): Promise<void>;
|
|
81
|
-
Close(): Promise<void>;
|
|
82
|
-
Stat(): Promise<StatInfo>;
|
|
83
|
-
Read(offset: bigint, size: number): Promise<Buffer>;
|
|
84
|
-
Write(offset: bigint, buffer: Buffer): Promise<void>;
|
|
85
|
-
WriteFd(offset: bigint, size: number, fd: number, fdoff?: bigint): Promise<void>;
|
|
86
|
-
Sync(): Promise<void>;
|
|
87
|
-
Truncate(size: bigint): Promise<void>;
|
|
88
|
-
IsOpen(): boolean;
|
|
89
|
-
GetProperty(name: string): {
|
|
90
|
-
success: boolean;
|
|
91
|
-
value: string;
|
|
92
|
-
};
|
|
93
|
-
SetProperty(name: string, value: string): boolean;
|
|
94
|
-
VectorRead(chunks: ReadChunkRequest[]): Promise<Buffer[]>;
|
|
95
|
-
ReadChunks(chunks: ReadChunkRequest[]): Promise<Buffer[]>;
|
|
96
|
-
SetXAttr(attrs: Record<string, string>): Promise<XAttrStatusResult[]>;
|
|
97
|
-
GetXAttr(keys: string[]): Promise<Record<string, string>>;
|
|
98
|
-
DelXAttr(keys: string[]): Promise<XAttrStatusResult[]>;
|
|
99
|
-
ListXAttr(): Promise<Record<string, string>>;
|
|
100
|
-
Clone(list: CloneLocationRequest[]): Promise<void>;
|
|
101
|
-
}
|
|
102
|
-
interface CopyJobConfig {
|
|
103
|
-
/** original source URL */
|
|
104
|
-
source: string;
|
|
105
|
-
/** target directory or file */
|
|
106
|
-
target: string;
|
|
107
|
-
/** maximum number sources */
|
|
108
|
-
sourceLimit?: number;
|
|
109
|
-
/** overwrite target if exists */
|
|
110
|
-
force?: boolean;
|
|
111
|
-
/** persistify only on successful close */
|
|
112
|
-
posc?: boolean;
|
|
113
|
-
/** ignore locking semantics on destination */
|
|
114
|
-
coerce?: boolean;
|
|
115
|
-
/** create path to the file if it doesn't exist */
|
|
116
|
-
makeDir?: boolean;
|
|
117
|
-
/** "first" try third party copy, if it fails try normal copy; "only" only try third party copy */
|
|
118
|
-
thirdParty?: string;
|
|
119
|
-
/** "none" - no checksumming
|
|
120
|
-
"end2end" - end to end checksumming
|
|
121
|
-
"source" - calculate checksum at source
|
|
122
|
-
"target" - calculate checksum at target */
|
|
123
|
-
checkSumMode?: "none" | "end2end" | "source" | "target";
|
|
124
|
-
/** type of the checksum to be used */
|
|
125
|
-
checkSumType?: string;
|
|
126
|
-
/** checksum preset */
|
|
127
|
-
checkSumPreset?: string;
|
|
128
|
-
/** size of a copy chunks in bytes */
|
|
129
|
-
chunkSize?: number;
|
|
130
|
-
/** number of chunks that should be requested in parallel
|
|
131
|
-
*
|
|
132
|
-
* [uint8_t]
|
|
133
|
-
*/
|
|
134
|
-
parallelChunks?: number;
|
|
135
|
-
/** time limit for successfull initialization of the copy job
|
|
136
|
-
* [time_t]
|
|
137
|
-
*/
|
|
138
|
-
initTimeout?: number;
|
|
139
|
-
/** time limit for the actual copy to finish
|
|
140
|
-
* [time_t]
|
|
141
|
-
*/
|
|
142
|
-
tpcTimeout?: number;
|
|
143
|
-
/** support for the case where the size source file may change during reading process */
|
|
144
|
-
dynamicSource?: boolean;
|
|
145
|
-
}
|
|
146
|
-
interface CopyJobResult {
|
|
147
|
-
/** checksum at source, if requested */
|
|
148
|
-
sourceCheckSum?: string;
|
|
149
|
-
/** checksum at target, if requested */
|
|
150
|
-
targetCheckSum?: string;
|
|
151
|
-
/** file size */
|
|
152
|
-
size: bigint;
|
|
153
|
-
/** status of the copy operation */
|
|
154
|
-
status?: XRootDOkError;
|
|
155
|
-
/** all sources used */
|
|
156
|
-
sources?: string[];
|
|
157
|
-
/** the actual disk server target */
|
|
158
|
-
realTarget?: string;
|
|
159
|
-
}
|
|
160
|
-
type ProgressCallback = (jobNum: number, processed: number, total: number) => void;
|
|
161
|
-
interface ReadStreamOptions {
|
|
162
|
-
start?: bigint;
|
|
163
|
-
end?: bigint;
|
|
164
|
-
/**
|
|
165
|
-
* 每次从底层读取的块大小 (默认 64KB)
|
|
166
|
-
*/
|
|
167
|
-
highWaterMark?: number;
|
|
168
|
-
}
|
|
169
|
-
interface WriteStreamOptions {
|
|
170
|
-
start?: bigint;
|
|
171
|
-
}
|
|
172
|
-
interface CloneLocationRequest {
|
|
173
|
-
srcFile: File;
|
|
174
|
-
dstOffset: bigint | number;
|
|
175
|
-
srcOffset: bigint | number;
|
|
176
|
-
length: bigint | number;
|
|
177
|
-
}
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region lib/enums.d.ts
|
|
180
|
-
/**
|
|
181
|
-
* XrdCl::OpenFlags - 文件打开选项
|
|
182
|
-
* @see src/XProtocol/XProtocol.hh:XOpenRequestOption
|
|
183
|
-
* @see src/XrdCl/XrdClFileSystem.hh:OpenFlags::Flags
|
|
184
|
-
*/
|
|
185
|
-
declare const OpenFlags: {
|
|
186
|
-
readonly None: 0;
|
|
187
|
-
readonly Compress: 1;
|
|
188
|
-
readonly Delete: 2;
|
|
189
|
-
readonly Force: 4;
|
|
190
|
-
readonly New: 8;
|
|
191
|
-
readonly Read: 16;
|
|
192
|
-
readonly Update: 32;
|
|
193
|
-
readonly Refresh: 128;
|
|
194
|
-
readonly MakePath: 256;
|
|
195
|
-
readonly IntentDirList: 1024;
|
|
196
|
-
readonly Replica: 2048;
|
|
197
|
-
readonly POSC: 4096;
|
|
198
|
-
readonly NoWait: 8192;
|
|
199
|
-
readonly SeqIO: 16384;
|
|
200
|
-
readonly Write: 32768;
|
|
201
|
-
readonly PrefName: 256;
|
|
202
|
-
readonly Dup: 65536;
|
|
203
|
-
readonly Samefs: 131072;
|
|
204
|
-
};
|
|
205
|
-
type OpenFlags = typeof OpenFlags[keyof typeof OpenFlags];
|
|
206
|
-
/**
|
|
207
|
-
* XrdCl::Access - 文件访问权限模式
|
|
208
|
-
* @see src/XProtocol/XProtocol.hh:XOpenRequestMode
|
|
209
|
-
* @see src/XrdCl/XrdClFileSystem.hh:Access::Mode
|
|
210
|
-
*/
|
|
211
|
-
declare const AccessMode: {
|
|
212
|
-
readonly None: 0;
|
|
213
|
-
readonly UR: 256;
|
|
214
|
-
readonly UW: 128;
|
|
215
|
-
readonly UX: 64;
|
|
216
|
-
readonly GR: 32;
|
|
217
|
-
readonly GW: 16;
|
|
218
|
-
readonly GX: 8;
|
|
219
|
-
readonly OR: 4;
|
|
220
|
-
readonly OW: 2;
|
|
221
|
-
readonly OX: 1;
|
|
222
|
-
};
|
|
223
|
-
type AccessMode = number;
|
|
224
|
-
/**
|
|
225
|
-
* XrdCl::MkDirFlags - 目录创建选项
|
|
226
|
-
* @see src/XrdCl/XrdClFileSystem.hh:MkDirFlags::Flags
|
|
227
|
-
*/
|
|
228
|
-
declare const MkDirFlags: {
|
|
229
|
-
readonly None: 0;
|
|
230
|
-
readonly MakePath: 1;
|
|
231
|
-
};
|
|
232
|
-
type MkDirFlags = typeof MkDirFlags[keyof typeof MkDirFlags];
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region lib/file.d.ts
|
|
235
|
-
type Combined = number & {};
|
|
236
|
-
/**
|
|
237
|
-
* XRootD File 客户端
|
|
238
|
-
* 提供对远程文件的异步读写操作及 Node.js 风格的流式接口。
|
|
239
|
-
*/
|
|
240
|
-
declare class File$1 {
|
|
241
|
-
private _internal;
|
|
242
|
-
constructor(internalInstance?: INativeFile);
|
|
243
|
-
/**
|
|
244
|
-
* 打开远程文件
|
|
245
|
-
* @param url 目标地址 (如 root://server//path/to/file)
|
|
246
|
-
* @param flags 打开标志位
|
|
247
|
-
* @param mode 访问权限模式
|
|
248
|
-
*/
|
|
249
|
-
open(url: string, flags?: OpenFlags | Combined, mode?: AccessMode | Combined): Promise<void>;
|
|
250
|
-
/**
|
|
251
|
-
* 关闭文件
|
|
252
|
-
*/
|
|
253
|
-
close(): Promise<void>;
|
|
254
|
-
/**
|
|
255
|
-
* 获取文件状态
|
|
256
|
-
*/
|
|
257
|
-
stat(): Promise<StatInfo>;
|
|
258
|
-
/**
|
|
259
|
-
* 读取文件块 (Zero-Copy from C++)
|
|
260
|
-
* @param offset 偏移量 (支持 >2GB)
|
|
261
|
-
* @param size 读取字节数
|
|
262
|
-
* @returns 包含数据的 Node.js Buffer
|
|
263
|
-
*/
|
|
264
|
-
read(offset: bigint | number, size: number): Promise<Buffer>;
|
|
265
|
-
/**
|
|
266
|
-
* 写入文件块 (Buffer 写入)
|
|
267
|
-
* @param offset 偏移量
|
|
268
|
-
* @param buffer 要写入的数据
|
|
269
|
-
*/
|
|
270
|
-
write(offset: bigint | number, buffer: Buffer): Promise<void>;
|
|
271
|
-
/**
|
|
272
|
-
* 从本地 fd 写入文件块
|
|
273
|
-
* @param offset 写入的起始字节偏移量。
|
|
274
|
-
* @param size 写入大小。
|
|
275
|
-
* @param fd 本地文件描述符 (fd)。
|
|
276
|
-
* @param fdoff 可选,从本地 fd 中读取的起始偏移。
|
|
277
|
-
*/
|
|
278
|
-
write(offset: bigint | number, size: number, fd: number, fdoff?: bigint | number): Promise<void>;
|
|
279
|
-
/**
|
|
280
|
-
* 从本地 fd 写入文件块 (直接映射)
|
|
281
|
-
* @param offset 写入的起始字节偏移量。
|
|
282
|
-
* @param size 写入大小。
|
|
283
|
-
* @param fd 本地文件描述符 (fd)。
|
|
284
|
-
* @param fdoff 可选,从本地 fd 中读取的起始偏移。
|
|
285
|
-
*/
|
|
286
|
-
writeFd(offset: bigint | number, size: number, fd: number, fdoff?: bigint | number): Promise<void>;
|
|
287
|
-
/**
|
|
288
|
-
* 同步文件缓冲区到磁盘
|
|
289
|
-
*/
|
|
290
|
-
sync(): Promise<void>;
|
|
291
|
-
/**
|
|
292
|
-
* 截断文件
|
|
293
|
-
* @param size 目标大小
|
|
294
|
-
*/
|
|
295
|
-
truncate(size: bigint | number): Promise<void>;
|
|
296
|
-
/**
|
|
297
|
-
* 检查本地实例状态 (同步操作)
|
|
298
|
-
*/
|
|
299
|
-
isOpen(): boolean;
|
|
300
|
-
getProperty(name: string): Promise<string>;
|
|
301
|
-
setProperty(name: string, value: string): Promise<boolean>;
|
|
302
|
-
/**
|
|
303
|
-
* 向量化读取 (Vector Read)
|
|
304
|
-
* 在单个请求中从文件的多个非连续区域读取数据,极大地减少网络往返开销。
|
|
305
|
-
* @param chunks 包含 offset 和 size 的读取请求数组
|
|
306
|
-
* @returns 与请求数组顺序对应的 Buffer 数组
|
|
307
|
-
*/
|
|
308
|
-
vectorRead(chunks: ReadChunkRequest[]): Promise<Buffer[]>;
|
|
309
|
-
/**
|
|
310
|
-
* 读取块 (Read Chunks)
|
|
311
|
-
* 类似于 VectorRead,但底层实现可能利用更高级的预读或多路复用策略。
|
|
312
|
-
*/
|
|
313
|
-
readChunks(chunks: ReadChunkRequest[]): Promise<Buffer[]>;
|
|
314
|
-
/**
|
|
315
|
-
* 设置文件的扩展属性
|
|
316
|
-
*/
|
|
317
|
-
setXAttrs(attrs: Record<string, string>): Promise<XAttrStatusResult[]>;
|
|
318
|
-
/**
|
|
319
|
-
* 设置文件的扩展属性
|
|
320
|
-
*/
|
|
321
|
-
setXAttr(key: string, value: string): Promise<boolean>;
|
|
322
|
-
/**
|
|
323
|
-
* 获取文件的扩展属性
|
|
324
|
-
*/
|
|
325
|
-
getXAttrs(keys: string[]): Promise<Record<string, string>>;
|
|
326
|
-
getXAttr(key: string): Promise<string>;
|
|
327
|
-
/**
|
|
328
|
-
* 删除文件的扩展属性
|
|
329
|
-
*/
|
|
330
|
-
delXAttrs(keys: string[]): Promise<XAttrStatusResult[]>;
|
|
331
|
-
delXAttr(key: string): Promise<boolean>;
|
|
332
|
-
/**
|
|
333
|
-
* 列出文件所有的扩展属性和内容
|
|
334
|
-
*/
|
|
335
|
-
listXAttrs(): Promise<Record<string, string>>;
|
|
336
|
-
/**
|
|
337
|
-
* 将其他文件的指定区间在服务器端克隆到当前文件
|
|
338
|
-
* 当前文件必须以写入/更新模式打开
|
|
339
|
-
*/
|
|
340
|
-
clone(locations: CloneLocationRequest[]): Promise<void>;
|
|
341
|
-
/**
|
|
342
|
-
* 创建一个可读流 (Readable Stream)
|
|
343
|
-
* 使得 XRootD 文件可以无缝 pipe 到其他 Node.js 流 (如本地 fs, HTTP response)
|
|
344
|
-
*/
|
|
345
|
-
createReadStream(options?: ReadStreamOptions): Readable;
|
|
346
|
-
/**
|
|
347
|
-
* 创建一个可写流 (Writable Stream)
|
|
348
|
-
* 支持通过 pipe 将大量数据流式写入 XRootD 服务器
|
|
349
|
-
*/
|
|
350
|
-
createWriteStream(options?: WriteStreamOptions): Writable;
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region lib/filesystem.d.ts
|
|
354
|
-
/**
|
|
355
|
-
* XRootD FileSystem 客户端
|
|
356
|
-
* 提供对远程服务器目录和文件的通用管理操作。
|
|
357
|
-
*/
|
|
358
|
-
declare class FileSystem {
|
|
359
|
-
private _internal;
|
|
360
|
-
readonly serverUrl: string;
|
|
361
|
-
/**
|
|
362
|
-
* 实例化一个 FileSystem 客户端
|
|
363
|
-
* @param url 服务器地址 (例如: 'root://eospublic.cern.ch')
|
|
364
|
-
*/
|
|
365
|
-
constructor(url: string);
|
|
366
|
-
/**
|
|
367
|
-
* 内部辅助方法:确保路径是标准的 Unix 绝对路径
|
|
368
|
-
*/
|
|
369
|
-
private _normalize;
|
|
370
|
-
/**
|
|
371
|
-
* 定位文件在集群中的具体数据节点
|
|
372
|
-
* @param filePath 目标文件路径
|
|
373
|
-
* @param flags 定位标志位 (默认 0)
|
|
374
|
-
* @returns 包含主机、端口等信息的数组
|
|
375
|
-
*/
|
|
376
|
-
locate(filePath: string, flags?: number): Promise<LocationInfo[]>;
|
|
377
|
-
/**
|
|
378
|
-
* 获取文件或目录的状态信息
|
|
379
|
-
* @param targetPath 目标路径
|
|
380
|
-
*/
|
|
381
|
-
stat(targetPath: string): Promise<StatInfo>;
|
|
382
|
-
/**
|
|
383
|
-
* 删除远程文件
|
|
384
|
-
* @param filePath 要删除的文件路径
|
|
385
|
-
*/
|
|
386
|
-
rm(filePath: string): Promise<void>;
|
|
387
|
-
/**
|
|
388
|
-
* 创建远程目录
|
|
389
|
-
* @param dirPath 目录路径
|
|
390
|
-
* @param flags 标志位 (例如 MakePath,允许创建多级父目录)
|
|
391
|
-
* @param mode 访问权限模式 (默认 0755 对应的 AccessMode)
|
|
392
|
-
*/
|
|
393
|
-
mkdir(dirPath: string, flags?: MkDirFlags, mode?: AccessMode): Promise<void>;
|
|
394
|
-
/**
|
|
395
|
-
* 删除远程目录 (目录必须为空)
|
|
396
|
-
* @param dirPath 要删除的目录路径
|
|
397
|
-
*/
|
|
398
|
-
rmdir(dirPath: string): Promise<void>;
|
|
399
|
-
/**
|
|
400
|
-
* 移动或重命名文件/目录
|
|
401
|
-
* @param source 源路径
|
|
402
|
-
* @param dest 目标路径
|
|
403
|
-
*/
|
|
404
|
-
mv(source: string, dest: string): Promise<void>;
|
|
405
|
-
/**
|
|
406
|
-
* 列出目录下的所有文件和子目录名
|
|
407
|
-
* @param dirPath 目录路径
|
|
408
|
-
* @param flags 标志位 (例如是否显示隐藏文件)
|
|
409
|
-
*/
|
|
410
|
-
dirList(dirPath: string, flags?: number): Promise<DirListEntry[]>;
|
|
411
|
-
/**
|
|
412
|
-
* 检查文件或目录是否存在
|
|
413
|
-
* (通过捕获 stat 的错误来实现,类似于老版本 Node 的 fs.exists)
|
|
414
|
-
* @param targetPath 目标路径
|
|
415
|
-
*/
|
|
416
|
-
exists(targetPath: string): Promise<boolean>;
|
|
417
|
-
/**
|
|
418
|
-
* 确保目录存在。如果目录不存在,则会自动创建它及其所有父目录。
|
|
419
|
-
* (类似于 fs-extra 的 ensureDir 或 mkdir -p)
|
|
420
|
-
* @param dirPath 目标目录
|
|
421
|
-
*/
|
|
422
|
-
ensureDir(dirPath: string): Promise<void>;
|
|
423
|
-
/**
|
|
424
|
-
* 深度定位:返回包含所有数据节点副本的详细物理位置信息
|
|
425
|
-
*/
|
|
426
|
-
deepLocate(filePath: string, flags?: number): Promise<LocationInfo[]>;
|
|
427
|
-
/**
|
|
428
|
-
* 在不打开文件的情况下,直接截断目标文件
|
|
429
|
-
*/
|
|
430
|
-
truncate(filePath: string, size: bigint | number): Promise<void>;
|
|
431
|
-
/**
|
|
432
|
-
* 更改远程文件或目录的访问权限
|
|
433
|
-
*/
|
|
434
|
-
chmod(targetPath: string, mode: AccessMode): Promise<void>;
|
|
435
|
-
/**
|
|
436
|
-
* 探活:检查远端文件系统服务是否响应
|
|
437
|
-
*/
|
|
438
|
-
ping(): Promise<void>;
|
|
439
|
-
/**
|
|
440
|
-
* 获取虚拟文件系统(VFS)的状态(如磁盘总容量、剩余可用空间)
|
|
441
|
-
*/
|
|
442
|
-
statVFS(targetPath: string): Promise<StatVFSInfo>;
|
|
443
|
-
/**
|
|
444
|
-
* 获取当前连接协议的详细属性
|
|
445
|
-
*/
|
|
446
|
-
protocol(): Promise<PropertyList>;
|
|
447
|
-
/**
|
|
448
|
-
* 发送带外查询指令到数据节点 (通常用于 XRootD 的高级自定义插件)
|
|
449
|
-
*/
|
|
450
|
-
query(queryCode: number, args: Buffer): Promise<Buffer>;
|
|
451
|
-
/**
|
|
452
|
-
* 发送通用信息到服务器
|
|
453
|
-
*/
|
|
454
|
-
sendInfo(info: string): Promise<Buffer>;
|
|
455
|
-
/**
|
|
456
|
-
* 发送缓存操作信息给集群
|
|
457
|
-
*/
|
|
458
|
-
sendCache(info: string): Promise<Buffer>;
|
|
459
|
-
/**
|
|
460
|
-
* 数据预热/暂存 (Staging):
|
|
461
|
-
* 在处理海量物理数据时,通知存储集群将特定的冷数据(如磁带上的文件)提前拉取到磁盘缓存。
|
|
462
|
-
* @param targetPaths 需要预热的路径数组
|
|
463
|
-
* @param flags 预热策略标志
|
|
464
|
-
* @param priority 优先级
|
|
465
|
-
*/
|
|
466
|
-
prepare(targetPaths: string[], flags?: number, priority?: number): Promise<Buffer>;
|
|
467
|
-
/**
|
|
468
|
-
* 获取文件系统属性
|
|
469
|
-
*/
|
|
470
|
-
getProperty(name: string): {
|
|
471
|
-
success: boolean;
|
|
472
|
-
value: string;
|
|
473
|
-
};
|
|
474
|
-
/**
|
|
475
|
-
* 设置文件系统属性
|
|
476
|
-
*/
|
|
477
|
-
setProperty(name: string, value: string): boolean;
|
|
478
|
-
/**
|
|
479
|
-
* 设置扩展属性
|
|
480
|
-
* @param targetPath 目标路径
|
|
481
|
-
* @param attrs 扩展属性键值对记录
|
|
482
|
-
*/
|
|
483
|
-
setXAttrs(targetPath: string, attrs: Record<string, string>): Promise<XAttrStatusResult[]>;
|
|
484
|
-
setXAttr(targetPath: string, key: string, value: string): Promise<boolean>;
|
|
485
|
-
/**
|
|
486
|
-
* 获取扩展属性
|
|
487
|
-
* @param targetPath 目标路径
|
|
488
|
-
* @param keys 需要获取的属性名数组
|
|
489
|
-
*/
|
|
490
|
-
getXAttrs(targetPath: string, keys: string[]): Promise<Record<string, string>>;
|
|
491
|
-
getXAttr(targetPath: string, key: string): Promise<string>;
|
|
492
|
-
/**
|
|
493
|
-
* 删除指定的扩展属性
|
|
494
|
-
* @param targetPath 目标路径
|
|
495
|
-
* @param keys 需要删除的属性名数组
|
|
496
|
-
*/
|
|
497
|
-
delXAttrs(targetPath: string, keys: string[]): Promise<XAttrStatusResult[]>;
|
|
498
|
-
delXAttr(targetPath: string, key: string): Promise<boolean>;
|
|
499
|
-
/**
|
|
500
|
-
* 列出目标文件或目录的所有扩展属性
|
|
501
|
-
*/
|
|
502
|
-
listXAttr(targetPath: string): Promise<Record<string, string>>;
|
|
503
|
-
}
|
|
504
|
-
//#endregion
|
|
505
|
-
//#region lib/copy.d.ts
|
|
506
|
-
declare class CopyProcess {
|
|
507
|
-
private nativeCp;
|
|
508
|
-
constructor();
|
|
509
|
-
/**
|
|
510
|
-
* Add a job to the copy process synchronously
|
|
511
|
-
*/
|
|
512
|
-
addJob(config: CopyJobConfig): void;
|
|
513
|
-
/**
|
|
514
|
-
* Asynchronously prepare the jobs (resolve DNS, check endpoints, etc.)
|
|
515
|
-
*/
|
|
516
|
-
prepare(): Promise<void>;
|
|
517
|
-
/**
|
|
518
|
-
* Run the copy process.
|
|
519
|
-
* @param onProgress Optional progress callback
|
|
520
|
-
* @returns Array of results corresponding to the jobs added
|
|
521
|
-
*/
|
|
522
|
-
run(onProgress?: ProgressCallback): Promise<CopyJobResult[]>;
|
|
523
|
-
/**
|
|
524
|
-
* Abort the running copy process.
|
|
525
|
-
*/
|
|
526
|
-
abort(): void;
|
|
527
|
-
/**
|
|
528
|
-
* Abort the running copy process. (alias for abort)
|
|
529
|
-
*/
|
|
530
|
-
cancelJob(): void;
|
|
531
|
-
}
|
|
532
|
-
//#endregion
|
|
533
|
-
//#region lib/url.d.ts
|
|
534
|
-
/**
|
|
535
|
-
* 纯 TypeScript 实现的 XRootD URL 解析器
|
|
536
|
-
* 安全、轻量,避免跨越 C++ N-API 边界
|
|
537
|
-
*/
|
|
538
|
-
declare class XRootDUrl {
|
|
539
|
-
private _url;
|
|
540
|
-
readonly isValid: boolean;
|
|
541
|
-
constructor(urlString: string);
|
|
542
|
-
get protocol(): string;
|
|
543
|
-
set protocol(protocol: string);
|
|
544
|
-
get hostName(): string;
|
|
545
|
-
set hostName(hostName: string);
|
|
546
|
-
get port(): number;
|
|
547
|
-
set port(port: number | string);
|
|
548
|
-
get userName(): string;
|
|
549
|
-
set userName(userName: string);
|
|
550
|
-
get password(): string;
|
|
551
|
-
set password(password: string);
|
|
552
|
-
get hostId(): string;
|
|
553
|
-
set pathWithParams(path: string);
|
|
554
|
-
get pathWithParams(): string;
|
|
555
|
-
set searchParams(params: string);
|
|
556
|
-
get searchParams(): string;
|
|
557
|
-
set anchor(anchor: string);
|
|
558
|
-
get anchor(): string;
|
|
559
|
-
set path(path: string);
|
|
560
|
-
get path(): string;
|
|
561
|
-
getParams(): Record<string, string>;
|
|
562
|
-
toString(): string;
|
|
563
|
-
static isValid(urlString: string): boolean;
|
|
564
|
-
}
|
|
565
|
-
//#endregion
|
|
566
|
-
//#region lib/env.d.ts
|
|
567
|
-
type String = string;
|
|
568
|
-
type Int = number | bigint;
|
|
569
|
-
type Bool = 'true' | 'false';
|
|
570
|
-
/**
|
|
571
|
-
* XRootD 底层客户端环境变量配置
|
|
572
|
-
* 参考自: XrdClConstants.hh 与 XrdClDefaultEnv.cc
|
|
573
|
-
*/
|
|
574
|
-
interface XRootDEnvConfig {
|
|
575
|
-
/**
|
|
576
|
-
* 每个通道的子流数量,用于多路复用并行传输。默认值: 1
|
|
577
|
-
*/
|
|
578
|
-
SubStreamsPerChannel?: Int;
|
|
579
|
-
/**
|
|
580
|
-
* 默认的请求超时时间 (秒)。
|
|
581
|
-
* 注意: XRootD C++ 默认是 1800(30 分钟),本 Node.js 库初始化时重置为 30。
|
|
582
|
-
*/
|
|
583
|
-
RequestTimeout?: Int;
|
|
584
|
-
/**
|
|
585
|
-
* 连接重试次数。默认值: 5
|
|
586
|
-
*/
|
|
587
|
-
ConnectionRetry?: Int;
|
|
588
|
-
/**
|
|
589
|
-
* 连接窗口时间 (秒)。如果在该窗口内没有成功建立连接,则报错。默认值: 120
|
|
590
|
-
*/
|
|
591
|
-
ConnectionWindow?: Int;
|
|
592
|
-
/**
|
|
593
|
-
* 流超时时间 (秒)。默认值: 60
|
|
594
|
-
*/
|
|
595
|
-
StreamTimeout?: Int;
|
|
596
|
-
/**
|
|
597
|
-
* 超时检测的时间精度/分辨率 (秒)。默认值: 15
|
|
598
|
-
*/
|
|
599
|
-
TimeoutResolution?: Int;
|
|
600
|
-
/**
|
|
601
|
-
* 流错误统计的时间窗口长度 (秒)。默认值: 1800
|
|
602
|
-
*/
|
|
603
|
-
StreamErrorWindow?: Int;
|
|
604
|
-
/**
|
|
605
|
-
* 是否启用多进程 fork 处理器,用于管理多线程 fork 同步。默认值: 1
|
|
606
|
-
*/
|
|
607
|
-
RunForkHandler?: Int;
|
|
608
|
-
/**
|
|
609
|
-
* 重定向的最大限制次数。默认值: 16
|
|
610
|
-
*/
|
|
611
|
-
RedirectLimit?: Int;
|
|
612
|
-
/**
|
|
613
|
-
* 内部工作线程数。默认值: 3。注意:本 Node.js 库初始化时重置为 4。
|
|
614
|
-
*/
|
|
615
|
-
WorkerThreads?: Int;
|
|
616
|
-
/**
|
|
617
|
-
* 并发运行的事件循环数量。默认值: 10
|
|
618
|
-
*/
|
|
619
|
-
ParallelEvtLoop?: Int;
|
|
620
|
-
/**
|
|
621
|
-
* 是否启用 TCP_NODELAY (禁用 Nagle 算法)。默认值: Linux 下为 1,OSX 下为 0
|
|
622
|
-
*/
|
|
623
|
-
NoDelay?: Int;
|
|
624
|
-
/**
|
|
625
|
-
* 异步 I/O 通知使用的信号(0 表示不使用)。默认值: 0
|
|
626
|
-
*/
|
|
627
|
-
AioSignal?: Int;
|
|
628
|
-
/**
|
|
629
|
-
* Copy 复制过程所使用的基本分块大小 (字节)。默认值: 8388608 (8MB)
|
|
630
|
-
*/
|
|
631
|
-
CPChunkSize?: Int;
|
|
632
|
-
/**
|
|
633
|
-
* Copy 过程中同时并发传输的分块数量。默认值: 4
|
|
634
|
-
*/
|
|
635
|
-
CPParallelChunks?: Int;
|
|
636
|
-
/**
|
|
637
|
-
* Copy 任务的初始化阶段超时时间 (秒)。默认值: 600
|
|
638
|
-
*/
|
|
639
|
-
CPInitTimeout?: Int;
|
|
640
|
-
/**
|
|
641
|
-
* 第三方复制 (Third Party Copy, TPC) 过程超时时间 (秒)。默认值: 1800
|
|
642
|
-
*/
|
|
643
|
-
CPTPCTimeout?: Int;
|
|
644
|
-
/**
|
|
645
|
-
* 整个 Copy 复制任务的总体超时时间 (秒,0 表示不限制)。默认值: 0
|
|
646
|
-
*/
|
|
647
|
-
CPTimeout?: Int;
|
|
648
|
-
/**
|
|
649
|
-
* 扩展 Copy 的单次写入最大块大小 (字节)。默认值: 134217728 (128MB)
|
|
650
|
-
*/
|
|
651
|
-
XCpBlockSize?: Int;
|
|
652
|
-
/**
|
|
653
|
-
* 写入被引导至负载均衡器时的重试次数上限。默认值: 3
|
|
654
|
-
*/
|
|
655
|
-
RetryWrtAtLBLimit?: Int;
|
|
656
|
-
/**
|
|
657
|
-
* Copy 任务的重试次数。默认值: 0
|
|
658
|
-
*/
|
|
659
|
-
CpRetry?: Int;
|
|
660
|
-
/**
|
|
661
|
-
* 在 Copy 复制传输时,是否启用渐进式读写。默认值: 1
|
|
662
|
-
*/
|
|
663
|
-
CpUsePgWrtRd?: Int;
|
|
664
|
-
/**
|
|
665
|
-
* 复制文件时是否保留扩展属性 (XAttrs)。默认值: 0
|
|
666
|
-
*/
|
|
667
|
-
PreserveXAttrs?: Int;
|
|
668
|
-
/**
|
|
669
|
-
* Copy 任务失败后的重试策略。默认值: "force"
|
|
670
|
-
*/
|
|
671
|
-
CpRetryPolicy?: 'force' | 'continue';
|
|
672
|
-
/**
|
|
673
|
-
* Copy 操作的目标类型。默认值: ""
|
|
674
|
-
*/
|
|
675
|
-
CpTarget?: String;
|
|
676
|
-
/**
|
|
677
|
-
* 是否启用 TCP Keep-Alive。默认值: 0
|
|
678
|
-
*/
|
|
679
|
-
TCPKeepAlive?: Int;
|
|
680
|
-
/**
|
|
681
|
-
* TCP 空闲多长时间后发送首次 Keep-Alive 探测包 (秒)。默认值: 7200
|
|
682
|
-
*/
|
|
683
|
-
TCPKeepAliveTime?: Int;
|
|
684
|
-
/**
|
|
685
|
-
* 两次 TCP Keep-Alive 探测包 of 发送间隔时间 (秒)。默认值: 75
|
|
686
|
-
*/
|
|
687
|
-
TCPKeepAliveInterval?: Int;
|
|
688
|
-
/**
|
|
689
|
-
* 连接断开前,最大允许的 TCP Keep-Alive 探测未响应次数。默认值: 9
|
|
690
|
-
*/
|
|
691
|
-
TCPKeepAliveProbes?: Int;
|
|
692
|
-
/**
|
|
693
|
-
* 数据服务器连接的生存时间 (TTL,秒)。默认值: 300
|
|
694
|
-
*/
|
|
695
|
-
DataServerTTL?: Int;
|
|
696
|
-
/**
|
|
697
|
-
* 负载均衡器连接的生存时间 (TTL,秒)。默认值: 1200
|
|
698
|
-
*/
|
|
699
|
-
LoadBalancerTTL?: Int;
|
|
700
|
-
/**
|
|
701
|
-
* 解析 IP 后是否禁止打乱顺序 (打乱顺序有利于负载均衡)。默认值: 0
|
|
702
|
-
*/
|
|
703
|
-
IPNoShuffle?: Int;
|
|
704
|
-
/**
|
|
705
|
-
* 定位端点时是否记录并排除已尝试失败的地址。默认值: 1
|
|
706
|
-
*/
|
|
707
|
-
PreserveLocateTried?: Int;
|
|
708
|
-
/**
|
|
709
|
-
* DNS 解析时是否优先选择 IPv4 而非 IPv6。默认值: 0
|
|
710
|
-
*/
|
|
711
|
-
PreferIPv4?: Int;
|
|
712
|
-
/**
|
|
713
|
-
* 首选的 Poller 轮询器实现。默认值: "built-in"
|
|
714
|
-
*/
|
|
715
|
-
PollerPreference?: 'built-in' | (string & {});
|
|
716
|
-
/**
|
|
717
|
-
* 使用的网络协议栈 (如 "IPAuto", "IPv4", "IPv6")。默认值: "IPAuto"
|
|
718
|
-
*/
|
|
719
|
-
NetworkStack?: 'IPAuto' | 'IPv4' | 'IPv6' | 'IPv4Mapped6' | 'IPAll';
|
|
720
|
-
/**
|
|
721
|
-
* 读数据失败时的恢复策略。默认值: "true"
|
|
722
|
-
*/
|
|
723
|
-
ReadRecovery?: Bool;
|
|
724
|
-
/**
|
|
725
|
-
* 写数据失败时的恢复策略。默认值: "true"
|
|
726
|
-
*/
|
|
727
|
-
WriteRecovery?: Bool;
|
|
728
|
-
/**
|
|
729
|
-
* 打开文件失败时的恢复策略。默认值: "true"
|
|
730
|
-
*/
|
|
731
|
-
OpenRecovery?: Bool;
|
|
732
|
-
/**
|
|
733
|
-
* 是否启用 Metalink 解析和处理。默认值: 1
|
|
734
|
-
*/
|
|
735
|
-
MetalinkProcessing?: Int;
|
|
736
|
-
/**
|
|
737
|
-
* 是否允许解析本地存储 of Metalink 文件。默认值: 0
|
|
738
|
-
*/
|
|
739
|
-
LocalMetalinkFile?: Int;
|
|
740
|
-
/**
|
|
741
|
-
* 等待 Metalink 下载的最大时间 (秒)。默认值: 60
|
|
742
|
-
*/
|
|
743
|
-
MaxMetalinkWait?: Int;
|
|
744
|
-
/**
|
|
745
|
-
* 是否对 Zip 文件的 Metalink 执行校验和检查。默认值: 0
|
|
746
|
-
*/
|
|
747
|
-
ZipMtlnCksum?: Int;
|
|
748
|
-
/**
|
|
749
|
-
* 强制使用的安全协议,例如 "unix" 或 "krb5,unix"(底层通过系统环境变量设置)。
|
|
750
|
-
*/
|
|
751
|
-
SecProtocol?: 'unix' | 'sss' | 'krb5' | 'pwd' | 'gsi' | 'host' | 'ztn' | (string & {});
|
|
752
|
-
/**
|
|
753
|
-
* 未授权 (Permission Denied) 时,触发自动刷新证书并重试的次数上限。默认值: 3
|
|
754
|
-
*/
|
|
755
|
-
NotAuthorizedRetryLimit?: Int;
|
|
756
|
-
/**
|
|
757
|
-
* 如果 TLS 握手失败,是否允许降级为非 TLS 明文传输。默认值: 0
|
|
758
|
-
*/
|
|
759
|
-
NoTlsOK?: Int;
|
|
760
|
-
/**
|
|
761
|
-
* 是否只对控制通道加密(控制通道加密,数据通道明文)。默认值: 0
|
|
762
|
-
*/
|
|
763
|
-
TlsNoData?: Int;
|
|
764
|
-
/**
|
|
765
|
-
* 获取 Metalink 配置文件时是否启用 TLS。默认值: 0
|
|
766
|
-
*/
|
|
767
|
-
TlsMetalink?: Int;
|
|
768
|
-
/**
|
|
769
|
-
* 是否在访问非渐进式文件时要求 TLS。默认值: 0
|
|
770
|
-
*/
|
|
771
|
-
WantTlsOnNoPgrw?: Int;
|
|
772
|
-
/**
|
|
773
|
-
* TLS 调试级别(如 "OFF", "INFO", "DEBUG")。默认值: "OFF"
|
|
774
|
-
*/
|
|
775
|
-
TlsDbgLvl?: 'OFF' | 'CTX' | 'SOK' | 'SIO' | 'ALL' | 'OUT' | 'INFO' | 'DEBUG' | (string & {});
|
|
776
|
-
/**
|
|
777
|
-
* 是否启用多协议通道支持。默认值: 0
|
|
778
|
-
*/
|
|
779
|
-
MultiProtocol?: Int;
|
|
780
|
-
/**
|
|
781
|
-
* 日志文件路径。底层拦截设置,直接对 C++ logger 生效。默认值: ""
|
|
782
|
-
*/
|
|
783
|
-
LogFile?: String;
|
|
784
|
-
/**
|
|
785
|
-
* 调试日志级别(如 "Dump", "Debug", "Info", "Warning", "Error", "")。底层拦截设置。
|
|
786
|
-
*/
|
|
787
|
-
DebugLevel?: 'Dump' | 'Debug' | 'Info' | 'Warning' | 'Error' | '';
|
|
788
|
-
/**
|
|
789
|
-
* 日志掩码,指定哪些子系统输出日志。底层拦截设置。
|
|
790
|
-
*/
|
|
791
|
-
LogMask?: String;
|
|
792
|
-
/**
|
|
793
|
-
* 客户端配置文件加载目录。默认值: ""
|
|
794
|
-
*/
|
|
795
|
-
ClConfDir?: String;
|
|
796
|
-
/**
|
|
797
|
-
* 默认客户端配置文件的绝对路径。默认值: ""
|
|
798
|
-
*/
|
|
799
|
-
DefaultClConfFile?: String;
|
|
800
|
-
/**
|
|
801
|
-
* 安全或传输插件配置文件的加载目录。默认值: ""
|
|
802
|
-
*/
|
|
803
|
-
PlugInConfDir?: String;
|
|
804
|
-
/**
|
|
805
|
-
* 指定动态加载的插件名称。默认值: ""
|
|
806
|
-
*/
|
|
807
|
-
PlugIn?: String;
|
|
808
|
-
/**
|
|
809
|
-
* 外部客户端监控插件动态链接库的加载路径。默认值: ""
|
|
810
|
-
*/
|
|
811
|
-
ClientMonitor?: String;
|
|
812
|
-
/**
|
|
813
|
-
* 传递给外部客户端监控插件的参数字符串。默认值: ""
|
|
814
|
-
*/
|
|
815
|
-
ClientMonitorParam?: String;
|
|
816
|
-
/**
|
|
817
|
-
* 应用的标识名称。默认值: 当前可执行文件名
|
|
818
|
-
*/
|
|
819
|
-
AppName?: String;
|
|
820
|
-
/**
|
|
821
|
-
* 监控上报信息内容。默认值: ""
|
|
822
|
-
*/
|
|
823
|
-
MonInfo?: String;
|
|
824
|
-
}
|
|
825
|
-
type KeysOfValue<T, TValue> = { [K in keyof T]: T[K] extends TValue ? K : never }[keyof T];
|
|
826
|
-
type XRootDEnvConfigIntKey = KeysOfValue<Required<XRootDEnvConfig>, Int>;
|
|
827
|
-
type XRootDEnvConfigBoolKey = KeysOfValue<Required<XRootDEnvConfig>, Bool>;
|
|
828
|
-
type XRootDEnvConfigStringKey = KeysOfValue<Required<XRootDEnvConfig>, String>;
|
|
829
|
-
declare class XRootDEnvironment {
|
|
830
|
-
constructor();
|
|
831
|
-
/**
|
|
832
|
-
* 设置整数配置项,返回是否设置成功。
|
|
833
|
-
*/
|
|
834
|
-
putInt(key: XRootDEnvConfigIntKey, intVal: number | bigint): boolean;
|
|
835
|
-
/**
|
|
836
|
-
* 设置字符串配置项,返回是否设置成功。
|
|
837
|
-
*/
|
|
838
|
-
putString<Key extends XRootDEnvConfigStringKey | XRootDEnvConfigBoolKey>(key: Key, strVal: XRootDEnvConfig[Key]): boolean;
|
|
839
|
-
/**
|
|
840
|
-
* 设置布尔配置项,返回是否设置成功。
|
|
841
|
-
*/
|
|
842
|
-
putBoolean(key: XRootDEnvConfigBoolKey, boolVal: boolean | Bool): boolean;
|
|
843
|
-
/**
|
|
844
|
-
* 获取整数配置项。
|
|
845
|
-
*/
|
|
846
|
-
getInt(key: XRootDEnvConfigIntKey): number | undefined;
|
|
847
|
-
/**
|
|
848
|
-
* 获取字符串配置项。
|
|
849
|
-
*/
|
|
850
|
-
getString(key: XRootDEnvConfigStringKey): string | undefined;
|
|
851
|
-
/**
|
|
852
|
-
* 批量安全地设置 XRootD 底层参数
|
|
853
|
-
*/
|
|
854
|
-
configure(config: XRootDEnvConfig): void;
|
|
855
|
-
/**
|
|
856
|
-
* 获取指定配置
|
|
857
|
-
*/
|
|
858
|
-
get(key: XRootDEnvConfigBoolKey): string | undefined;
|
|
859
|
-
get(key: XRootDEnvConfigStringKey): string | undefined;
|
|
860
|
-
get(key: XRootDEnvConfigIntKey): number | undefined;
|
|
861
|
-
}
|
|
862
|
-
declare const Env: XRootDEnvironment;
|
|
863
|
-
//#endregion
|
|
864
|
-
export { AccessMode, CopyProcess, Env, File$1 as File, FileSystem, type LocationInfo, MkDirFlags, OpenFlags, type PropertyList, type ReadChunkRequest, type ReadStreamOptions, type StatInfo, type StatVFSInfo, XRootDUrl as URL, type WriteStreamOptions, type XRootDError };
|