0.3.0 • Published 9 months ago

grpc-js-helper v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

grpc-js-helper

CI

Some useful items for playing with @grpc/grpc-js.

Usage

import { ServiceError, ServiceStatus, serviceCall } from 'grpc-js-helper';

// ..

try {
    const result = await serviceCall(serviceClient.method1());
} catch (error) {
    if (error instanceof ServiceError) {
        switch (error.code) {
            case ServiceStatus.UNAVAILABLE:
                // do something
                break;
        }
    } else {
        // should be unreachable
    }
}

License

MIT

0.3.0

9 months ago

0.2.7

10 months ago

0.2.6

10 months ago

0.2.9

10 months ago

0.2.8

10 months ago

0.2.5

10 months ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago