MCPcopy Index your code
hub / github.com/coder/coder / Chan

Method Chan

codersdk/wsjson/stream.go:30–32  ·  view source on GitHub ↗

Chan returns a `chan` that you can read incoming messages from. The returned `chan` will be closed when the WebSocket connection is closed. If there is an error reading from the WebSocket or decoding a value the WebSocket will be closed. Safety: Chan must only be called once. Successive calls will

()

Source from the content-addressed store, hash-verified

28//
29// Safety: Chan must only be called once. Successive calls will panic.
30func (s *Stream[R, W]) Chan() <-chan R {
31 return s.r.Chan()
32}
33
34func (s *Stream[R, W]) Send(v W) error {
35 return s.w.Encode(v)

Callers 15

TestWatchChatGitFunction · 0.45
TestWatchAgentContainersFunction · 0.45
watchChatGitMethod · 0.45
SynchronousStreamFunction · 0.45
TestWatcher_AgentsFunction · 0.45
TestWatcher_LostAccessFunction · 0.45

Calls

no outgoing calls