@flashbacktech/flashbackclient 0.0.79 → 0.0.80
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.
|
@@ -3,13 +3,35 @@ export declare enum BucketStatusType {
|
|
|
3
3
|
OFFLINE = "OFFLINE",
|
|
4
4
|
ERROR = "ERROR"
|
|
5
5
|
}
|
|
6
|
+
interface NodeSignedMessage {
|
|
7
|
+
ip: string;
|
|
8
|
+
region: string;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
signature: string;
|
|
11
|
+
}
|
|
6
12
|
export interface BucketStatus {
|
|
7
13
|
unitId: string;
|
|
8
14
|
status: BucketStatusType;
|
|
9
15
|
latency_ms?: number;
|
|
10
16
|
createdAt: string;
|
|
11
17
|
}
|
|
12
|
-
export interface
|
|
18
|
+
export interface BucketStatusRequest extends NodeSignedMessage {
|
|
19
|
+
buckets: BucketStatus[];
|
|
20
|
+
}
|
|
21
|
+
export interface NodeStatsResponse {
|
|
13
22
|
nodeIP: string;
|
|
14
23
|
buckets: BucketStatus[];
|
|
15
24
|
}
|
|
25
|
+
export interface RegisterRequest extends NodeSignedMessage {
|
|
26
|
+
provider: string;
|
|
27
|
+
status: string;
|
|
28
|
+
region: string;
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RegisterResponse {
|
|
32
|
+
success: boolean;
|
|
33
|
+
message: string;
|
|
34
|
+
error_code?: string;
|
|
35
|
+
error_message?: string;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
package/dist/gcs/storage.js
CHANGED
|
@@ -10,7 +10,7 @@ const crypto_1 = __importDefault(require("crypto"));
|
|
|
10
10
|
const originalRequest = require('gaxios').instance.request;
|
|
11
11
|
class FlashbackGCSStorage extends storage_1.Storage {
|
|
12
12
|
constructor(opts) {
|
|
13
|
-
const { credentials, apiEndpoint = 'https://gcs
|
|
13
|
+
const { credentials, apiEndpoint = 'https://gcs-us-east-1-gcp.flashback.tech', tokenScopes = ['READ', 'WRITE'], ...rest } = opts;
|
|
14
14
|
const authClient = new oauth2_1.FlashbackAuthClient(apiEndpoint + '/token', tokenScopes, credentials);
|
|
15
15
|
super({
|
|
16
16
|
...rest,
|