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.
()
| 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 | """ |