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

Method broadcastUpdatesLocked

agent/agentcontainers/api.go:749–757  ·  view source on GitHub ↗

broadcastUpdatesLocked sends the current state to any listening clients. This method assumes that api.mu is held.

()

Source from the content-addressed store, hash-verified

747// broadcastUpdatesLocked sends the current state to any listening clients.
748// This method assumes that api.mu is held.
749func (api *API) broadcastUpdatesLocked() {
750 // Broadcast state changes to WebSocket listeners.
751 for _, ch := range api.updateChans {
752 select {
753 case ch <- struct{}{}:
754 default:
755 }
756 }
757}
758
759func (api *API) watchContainers(rw http.ResponseWriter, r *http.Request) {
760 ctx := r.Context()

Callers 6

updateContainersMethod · 0.95
CreateDevcontainerMethod · 0.95
markDevcontainerDirtyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected