grpc-js: expose Server implementation publicly

This commit exposes the pure JS Server as public API.
This commit is contained in:
cjihrig 2019-06-20 14:30:42 -04:00
parent bf4c6b9e54
commit 0b4fd1365a
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
4 changed files with 5 additions and 9 deletions

View File

@ -38,6 +38,7 @@ import {
Serialize, Serialize,
} from './make-client'; } from './make-client';
import { Metadata } from './metadata'; import { Metadata } from './metadata';
import { Server } from './server';
import { KeyCertPair, ServerCredentials } from './server-credentials'; import { KeyCertPair, ServerCredentials } from './server-credentials';
import { StatusBuilder } from './status-builder'; import { StatusBuilder } from './status-builder';
@ -259,10 +260,7 @@ export const setLogVerbosity = (verbosity: LogVerbosity): void => {
logging.setLoggerVerbosity(verbosity); logging.setLoggerVerbosity(verbosity);
}; };
export const Server = (options: any) => { export { Server };
throw new Error('Not yet implemented');
};
export { ServerCredentials }; export { ServerCredentials };
export { KeyCertPair }; export { KeyCertPair };

View File

@ -21,10 +21,9 @@ import * as assert from 'assert';
import * as path from 'path'; import * as path from 'path';
import * as grpc from '../src'; import * as grpc from '../src';
import { ServerCredentials } from '../src'; import { Server, ServerCredentials } from '../src';
import { ServiceError } from '../src/call'; import { ServiceError } from '../src/call';
import { ServiceClient, ServiceClientConstructor } from '../src/make-client'; import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
import { Server } from '../src/server';
import { import {
sendUnaryData, sendUnaryData,
ServerUnaryCall, ServerUnaryCall,

View File

@ -21,9 +21,9 @@ import * as assert from 'assert';
import { join } from 'path'; import { join } from 'path';
import * as grpc from '../src'; import * as grpc from '../src';
import { Server } from '../src';
import { ServiceError } from '../src/call'; import { ServiceError } from '../src/call';
import { ServiceClient, ServiceClientConstructor } from '../src/make-client'; import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
import { Server } from '../src/server';
import { import {
sendUnaryData, sendUnaryData,
ServerDuplexStream, ServerDuplexStream,

View File

@ -23,10 +23,9 @@ import * as http2 from 'http2';
import * as path from 'path'; import * as path from 'path';
import * as grpc from '../src'; import * as grpc from '../src';
import { ServerCredentials } from '../src'; import { Server, ServerCredentials } from '../src';
import { ServiceError } from '../src/call'; import { ServiceError } from '../src/call';
import { ServiceClient, ServiceClientConstructor } from '../src/make-client'; import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
import { Server } from '../src/server';
import { sendUnaryData, ServerUnaryCall } from '../src/server-call'; import { sendUnaryData, ServerUnaryCall } from '../src/server-call';
import { loadProtoFile } from './common'; import { loadProtoFile } from './common';