src/streamingCalls/streamDescriptor.ts
A descriptor for streaming calls.
Properties |
Methods |
constructor(streamType: StreamType)
|
||||||
Defined in src/streamingCalls/streamDescriptor.ts:43
|
||||||
Parameters :
|
type |
Type : StreamType
|
Defined in src/streamingCalls/streamDescriptor.ts:43
|
getApiCaller | ||||||
getApiCaller(settings: CallSettings)
|
||||||
Defined in src/streamingCalls/streamDescriptor.ts:49
|
||||||
Parameters :
Returns :
APICaller
|
import {APICaller} from '../apiCaller';
import {Descriptor} from '../descriptor';
import {CallSettings} from '../gax';
import {StreamType} from './streaming';
import {StreamingApiCaller} from './streamingApiCaller';
/**
* A descriptor for streaming calls.
*/
export class StreamDescriptor implements Descriptor {
type: StreamType;
constructor(streamType: StreamType) {
this.type = streamType;
}
getApiCaller(settings: CallSettings): APICaller {
// Right now retrying does not work with gRPC-streaming, because retryable
// assumes an API call returns an event emitter while gRPC-streaming methods
// return Stream.
// TODO: support retrying.
settings.retry = null;
return new StreamingApiCaller(this);
}
}