🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

nice-grpc-server-middleware-terminator

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nice-grpc-server-middleware-terminator - npm Package Compare versions

Comparing version

to
2.0.6

14

lib/index.d.ts
import { ServerMiddleware } from 'nice-grpc-common';
export type TerminatorContext = {
/**
* Mark the call as one that should be aborted when the server is shutting
* down.
*/
abortOnTerminate(): void;
};
/**
* Server middleware that makes it possible to prevent long-running calls from
* blocking server graceful shutdown.
*/
export type TerminatorMiddleware = ServerMiddleware<TerminatorContext> & {
/**
* Aborts all calls that have called `abortOnTerminate` and make them return
* gRPC errors with status `UNAVAILABLE`.
*
* Call this method right before calling `server.shutdown()`.
*/
terminate(): void;
};
export declare function TerminatorMiddleware(): TerminatorMiddleware;

8

package.json
{
"name": "nice-grpc-server-middleware-terminator",
"version": "2.0.5",
"version": "2.0.6",
"description": "Server middleware for nice-grpc to terminate long-running calls on shutdown",

@@ -30,9 +30,9 @@ "repository": "deeplay-io/nice-grpc",

"grpc-tools": "^1.10.0",
"nice-grpc": "^2.1.3",
"nice-grpc": "^2.1.4",
"ts-proto": "^1.112.0"
},
"dependencies": {
"nice-grpc-common": "^2.0.1"
"nice-grpc-common": "^2.0.2"
},
"gitHead": "0e773a1697c7fdcacdf9a244f78e813577c8c8bd"
"gitHead": "a2987f236be78513ea607faf691c9471d640bd0e"
}

@@ -10,6 +10,20 @@ import {

export type TerminatorContext = {
/**
* Mark the call as one that should be aborted when the server is shutting
* down.
*/
abortOnTerminate(): void;
};
/**
* Server middleware that makes it possible to prevent long-running calls from
* blocking server graceful shutdown.
*/
export type TerminatorMiddleware = ServerMiddleware<TerminatorContext> & {
/**
* Aborts all calls that have called `abortOnTerminate` and make them return
* gRPC errors with status `UNAVAILABLE`.
*
* Call this method right before calling `server.shutdown()`.
*/
terminate(): void;

@@ -16,0 +30,0 @@ };

Sorry, the diff of this file is not supported yet