streamFromInputStream method

  1. @override
Stream<RunOutput> streamFromInputStream(
  1. Stream<RunInput> inputStream, {
  2. RunnableOptions? options,
})
override

Streams the output of invoking the Runnable on the given inputStream.

  • inputStream - the input stream to invoke the Runnable on.
  • options - the options to use when invoking the Runnable.

Implementation

@override
Stream<RunOutput> streamFromInputStream(
  final Stream<RunInput> inputStream, {
  final RunnableOptions? options,
}) async* {
  if (_streamFunc != null) {
    yield* _streamFunc(inputStream, options);
  } else {
    yield* inputStream.asyncMap((final input) async {
      return invoke(input, options: options);
    });
  }
}