{"library":"nice-grpc-server-middleware-terminator","type":"library","category":null,"description":"The `nice-grpc-server-middleware-terminator` package provides a crucial server middleware for `nice-grpc` to facilitate graceful shutdown of gRPC services by actively terminating long-running calls. It addresses a common challenge in gRPC, particularly with streaming RPCs, where `server.shutdown()` would otherwise block indefinitely until all in-flight requests complete or are cancelled by the client. This middleware injects a `context.signal` into service implementations; when `server.shutdown()` is initiated, this signal is aborted, prompting the service method to stop processing. Clients of terminated calls receive a `UNAVAILABLE: Server shutting down` gRPC error, ensuring that the server can complete its shutdown process within a predictable timeframe. The current stable version is 2.0.17, with updates typically coinciding with the broader `nice-grpc` ecosystem. Its key differentiator is providing a standardized, integrated mechanism within the `nice-grpc` framework for managing server-side RPC lifecycle during shutdown, directly supporting the modern `AbortSignal` pattern.","language":"javascript","status":"active","version":"2.0.17","tags":["javascript","typescript"],"install":[{"cmd":"npm install nice-grpc-server-middleware-terminator","imports":["import { createTerminatorMiddleware } from 'nice-grpc-server-middleware-terminator';","import type { TerminatorContext } from 'nice-grpc-server-middleware-terminator';","import { isTerminated } from 'nice-grpc-server-middleware-terminator';"]},{"cmd":"yarn add nice-grpc-server-middleware-terminator","imports":[]},{"cmd":"pnpm add nice-grpc-server-middleware-terminator","imports":[]}],"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/nice-grpc-server-middleware-terminator","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/nice-grpc-server-middleware-terminator/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}