jina.peapods.stream.base module

class jina.peapods.stream.base.BaseStreamer(args, iolet)[source]

Bases: abc.ABC

An base async request/response handler

Parameters
  • args (Namespace) – args from CLI

  • iolet (Union[ForwardRef, ForwardRef, ForwardRef, ForwardRef]) – One of AsyncZmqlet or Grpclet. Used for sending/receiving data to/from the Flow

abstract async stream(request_iterator)[source]

iterate through the request iterator and return responses in an async iterator

Parameters

request_iterator (Union[Iterator, AsyncIterator]) – requests iterator from Client

Return type

AsyncIterator