@protobuf-ts/grpc-backend
Advanced tools
Comparing version 2.0.0-alpha.29 to 2.0.0-alpha.30
{ | ||
"name": "@protobuf-ts/grpc-backend", | ||
"version": "2.0.0-alpha.29", | ||
"version": "2.0.0-alpha.30", | ||
"description": "gRPC backend for servers generated by the protoc plugin \"protobuf-ts\"", | ||
@@ -27,4 +27,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@protobuf-ts/runtime": "^2.0.0-alpha.29", | ||
"@protobuf-ts/runtime-rpc": "^2.0.0-alpha.29" | ||
"@protobuf-ts/runtime": "^2.0.0-alpha.30", | ||
"@protobuf-ts/runtime-rpc": "^2.0.0-alpha.30" | ||
}, | ||
@@ -35,4 +35,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@protobuf-ts/plugin": "^2.0.0-alpha.29", | ||
"@protobuf-ts/protoc": "^2.0.0-alpha.29", | ||
"@grpc/grpc-js": "^1.2.2", | ||
"@protobuf-ts/plugin": "^2.0.0-alpha.30", | ||
"@protobuf-ts/protoc": "^2.0.0-alpha.30", | ||
"@types/jasmine": "^3.5.10", | ||
@@ -45,3 +46,3 @@ "jasmine": "^3.5.0", | ||
}, | ||
"gitHead": "4b0c1f85efab2be637ba09422c00aff522d07e4f" | ||
"gitHead": "c970d9aeda89c63aea69eb609de13fc85d5840dd" | ||
} |
@@ -1,5 +0,5 @@ | ||
@protobuf-ts/grpc-transport | ||
=========================== | ||
@protobuf-ts/grpc-backend | ||
========================= | ||
[gRPC](https://grpc.io/) transport for clients generated by [protobuf-ts](https://github.com/timostamm/protobuf-ts/). | ||
[gRPC](https://grpc.io/) backend for generic servers generated by [protobuf-ts](https://github.com/timostamm/protobuf-ts/). | ||
@@ -10,41 +10,12 @@ Installation: | ||
# with npm: | ||
npm install @protobuf-ts/grpc-transport | ||
npm install @protobuf-ts/grpc-backend | ||
# with yarn: | ||
yarn add @protobuf-ts/grpc-transport | ||
yarn add @protobuf-ts/grpc-backend | ||
``` | ||
Note that this feature is experimental and may change with minor releases. | ||
You probably want the protoc plugin as well: | ||
```shell script | ||
# with npm: | ||
npm install -D @protobuf-ts/plugin | ||
To learn more, please read the [MANUAL](https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#generic-rpc-servers). | ||
# with yarn: | ||
yarn add --dev @protobuf-ts/plugin | ||
``` | ||
Usage: | ||
```typescript | ||
const transport = new GrpcTransport({ | ||
host: "localhost:5000", | ||
channelCredentials: ChannelCredentials.createInsecure(), | ||
}); | ||
let client = new HaberdasheryClient(transport); | ||
let {response} = await client.makeHat({ inches: 11 }); | ||
console.log("got a small hat! " + response) | ||
let streamingCall = client.makeRowOfHats({ inches: 23 }); | ||
for await (let hat of streamingCall.response) { | ||
console.log("got another hat! " + hat) | ||
} | ||
``` | ||
To learn more, please read the [MANUAL](https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#grpc-transport). | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41575
9
21