Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ferrum-db-client

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ferrum-db-client - npm Package Compare versions

Comparing version 0.3.9 to 0.3.10

4

dist/index.d.ts

@@ -18,3 +18,3 @@ import { FerrumDBRemote } from './db_remote';

readonly onResponseReceived: EventEmitter<DatabaseResponseMetrics>;
readonly onTimeout: EventEmitter<void>;
readonly onTimeout: EventEmitter<string>;
private constructor();

@@ -26,2 +26,4 @@ setRequestTimeout(timeout: number): void;

private disconnect;
static reconnectAll(): void;
reconnect(): void;
createDatabaseIfNotExists(dbName: string): Promise<FerrumDBRemote>;

@@ -28,0 +30,0 @@ createDatabase(dbName: string): Promise<FerrumDBRemote>;

@@ -69,2 +69,13 @@ "use strict";

}
static reconnectAll() {
for (const key of Object.keys(FerrumServerClient.instanceMap)) {
FerrumServerClient.instanceMap[key].reconnect();
}
}
reconnect() {
this.client = new database_server_grpc_pb_1.DatabaseServerClient(`${this.ip}:${this.port}`, grpc_js_1.ChannelCredentials.createSsl(), {
'grpc.max_send_message_length': -1,
'grpc.max_receive_message_length': -1,
});
}
async createDatabaseIfNotExists(dbName) {

@@ -71,0 +82,0 @@ const msg = new database_server_pb_1.CreateDatabaseRequest();

@@ -21,3 +21,3 @@ import { ServiceError } from '@grpc/grpc-js';

startNotifier: EventEmitter<void>;
timeoutNotifier: EventEmitter<void>;
timeoutNotifier: EventEmitter<string>;
responseNotifier: EventEmitter<DatabaseResponseMetrics>;

@@ -24,0 +24,0 @@ timeout: number;

@@ -58,3 +58,3 @@ "use strict";

timeoutHandle = setTimeout(() => {
observerConfig.timeoutNotifier.emit();
observerConfig.timeoutNotifier.emit(printMessage(msg));
}, observerConfig.timeout);

@@ -61,0 +61,0 @@ }

{
"name": "ferrum-db-client",
"version": "0.3.9",
"version": "0.3.10",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

@@ -30,3 +30,3 @@ import { ChannelCredentials } from '@grpc/grpc-js';

public readonly onResponseReceived: EventEmitter<DatabaseResponseMetrics> = new EventEmitter();
public readonly onTimeout: EventEmitter<void> = new EventEmitter();
public readonly onTimeout: EventEmitter<string> = new EventEmitter();

@@ -78,6 +78,19 @@ private constructor(ip: string, port: number) {

private disconnect() {
private disconnect(): void {
this.client.close();
}
public static reconnectAll(): void {
for (const key of Object.keys(FerrumServerClient.instanceMap)) {
FerrumServerClient.instanceMap[key].reconnect();
}
}
public reconnect(): void {
this.client = new DatabaseServerClient(`${this.ip}:${this.port}`, ChannelCredentials.createSsl(), {
'grpc.max_send_message_length': -1,
'grpc.max_receive_message_length': -1,
});
}
public async createDatabaseIfNotExists(dbName: string): Promise<FerrumDBRemote> {

@@ -84,0 +97,0 @@ const msg = new CreateDatabaseRequest();

@@ -57,3 +57,3 @@ import { ServiceError } from '@grpc/grpc-js';

startNotifier: EventEmitter<void>;
timeoutNotifier: EventEmitter<void>;
timeoutNotifier: EventEmitter<string>;
responseNotifier: EventEmitter<DatabaseResponseMetrics>;

@@ -70,3 +70,3 @@ timeout: number;

timeoutHandle = setTimeout(() => {
observerConfig.timeoutNotifier.emit();
observerConfig.timeoutNotifier.emit(printMessage(msg));
}, observerConfig.timeout);

@@ -73,0 +73,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc