1.0.0-alpha2 • Published 3 years ago

@eventhub/pubsub-grpc-ts v1.0.0-alpha2

Weekly downloads
4
License
-
Repository
-
Last release
3 years ago

@eventhub/pubsub-grpc-ts

Typescript generated protobufs and gRPC client/server stubs for the Event Hub Pubsub API.

Usage

Clients

const { protos, grpc } = require('@eventhub/pubsub-grpc-ts');

// other setup here ...

// Publisher client
const publisher = new grpc.PublisherClient(url, credentials, opts);

// Subscriber client
const subscriber = new grpc.SubscriberClient(url, credentials, opts);

Servers

const { Server } = require('@grpc');
const { protos, grpc } = require('@eventhub/pubsub-grpc-ts');

// other setup here ...

const server = new Server();
server.addService(grpc.PublisherService, publisherHandlers);
server.addService(grpc.SubscriberService, subscriberHandlers);

Versions

This package is tagged with versions based on the version of the protobuf Pubsub interface definition(s). For example, v1alpha1 of the gRPC Pubsub API is generated and published under the tag v1alpha1, v1 of the API would be tagged v1, and so on and so forth.