v2.0.0
Completely rewritten in TypeScript.
Break Change
Loader
- no-module-default
- use
import { Protoloader } from 'grpcity'
instead ofimport GrpcLoader from 'grpcity'
- remove
closeClients()
- move
client()
toclass Client
- move
realClient
toclass Client
- remove
clientWithoutCache()
- use
makeClientCredentials()
instead ofmakeCredentials()
- add
makeServerCredentials()
- remove
message()
init()
no longer supportservices
optioninitClients()
is async func and returnnew class Client
initServer
is async func and returnnew class Server
Client
- new class Client
- use
get()
instead ofloader.client()
- use
getReal()
instead ofloader.clientReal()
- support
clear()
to clear client proxy cache and factory cache - support client middleware
- new client context for middleware
- use
use()
on add middleware func - unary method support middleware
- async stream support middleware
- cache
loader.initClient()
options credentials - custom type for method call option
Server
- use
add()
instead ofaddService()
- use
remove()
instead ofremoveService()
- move
makeServerCredentials()
toclass ProtoLoader
- use
use()
instead ofaddMiddleware()
- new server middleware context
- custom type for method call option
Other
- export grpc status
- full test for unaryCall and async stream call
- use jest instead of mocha
- add example