MCPcopy Create free account
hub / github.com/cloudbase/garm / Write

Method Write

websocket/websocket.go:126–138  ·  view source on GitHub ↗
(msg []byte)

Source from the content-addressed store, hash-verified

124}
125
126func (h *Hub) Write(msg []byte) (int, error) {
127 tmp := make([]byte, len(msg))
128 copy(tmp, msg)
129
130 select {
131 case h.broadcast <- tmp:
132 return len(tmp), nil
133 case <-h.quit:
134 return 0, fmt.Errorf("websocket hub is shutting down")
135 default:
136 return 0, fmt.Errorf("failed to broadcast over websocket")
137 }
138}
139
140func (h *Hub) Start() error {
141 h.mux.Lock()

Callers 14

validateHookBodyMethod · 0.45
CreateFileObjectMethod · 0.45
runMethod · 0.45
runner.goFile · 0.45
EventsHandlerMethod · 0.45
MetricsHandlerMethod · 0.45
WSHandlerMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected