MCPcopy
hub / github.com/benoitc/gunicorn / make_chunk_message

Function make_chunk_message

gunicorn/dirty/protocol.py:728–743  ·  view source on GitHub ↗

Build a chunk message dict for streaming responses. Args: request_id: Request identifier this chunk belongs to data: Chunk data Returns: dict: Chunk message dict

(request_id, data)

Source from the content-addressed store, hash-verified

726
727
728def make_chunk_message(request_id, data) -> dict:
729 """
730 Build a chunk message dict for streaming responses.
731
732 Args:
733 request_id: Request identifier this chunk belongs to
734 data: Chunk data
735
736 Returns:
737 dict: Chunk message dict
738 """
739 return {
740 "type": DirtyProtocol.MSG_TYPE_CHUNK,
741 "id": request_id,
742 "data": data,
743 }
744
745
746def make_end_message(request_id) -> dict:

Calls

no outgoing calls