MCPcopy Create free account
hub / github.com/apache/mesos / _initial_input_streamer

Method _initial_input_streamer

src/python/cli_new/lib/cli/mesos.py:618–634  ·  view source on GitHub ↗

Generator function yielding the initial ATTACH_CONTAINER_INPUT message for streaming. We have a separate generator for this so that we can attempt the connection once before committing to a persistent connection where we stream the rest of the input.

()

Source from the content-addressed store, hash-verified

616 """
617
618 def _initial_input_streamer():
619 """
620 Generator function yielding the initial ATTACH_CONTAINER_INPUT
621 message for streaming. We have a separate generator for this so
622 that we can attempt the connection once before committing to a
623 persistent connection where we stream the rest of the input.
624
625 :returns: A RecordIO encoded message
626 """
627
628 message = {
629 'type': 'ATTACH_CONTAINER_INPUT',
630 'attach_container_input': {
631 'type': 'CONTAINER_ID',
632 'container_id': self.container_id}}
633
634 yield self.encoder.encode(message)
635
636 def _input_streamer():
637 """

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected