MCPcopy Create free account
hub / github.com/kubernetes-client/python / peek_channel

Method peek_channel

kubernetes/base/stream/ws_client.py:82–90  ·  view source on GitHub ↗

Peek a channel and return part of the input, empty string otherwise.

(self, channel, timeout=0)

Source from the content-addressed store, hash-verified

80 self._returncode = None
81
82 def peek_channel(self, channel, timeout=0):
83 """Peek a channel and return part of the input,
84 empty string otherwise."""
85 if channel in self._closed_channels and channel not in self._channels:
86 return b"" if self.binary else ""
87 self.update(timeout=timeout)
88 if channel in self._channels:
89 return self._channels[channel]
90 return b"" if self.binary else ""
91
92 def read_channel(self, channel, timeout=0):
93 """Read data from a channel."""

Callers 4

read_channelMethod · 0.95
peek_stdoutMethod · 0.95
peek_stderrMethod · 0.95

Calls 1

updateMethod · 0.95