MCPcopy
hub / github.com/gopherdata/gophernotes / Reply

Method Reply

messages.go:201–212  ·  view source on GitHub ↗

Reply creates a new ComposedMsg and sends it back to the return identities over the Shell channel.

(msgType string, content interface{})

Source from the content-addressed store, hash-verified

199// Reply creates a new ComposedMsg and sends it back to the return identities over the
200// Shell channel.
201func (receipt *msgReceipt) Reply(msgType string, content interface{}) error {
202 msg, err := NewMsg(msgType, receipt.Msg)
203
204 if err != nil {
205 return err
206 }
207
208 msg.Content = content
209 return receipt.Sockets.ShellSocket.RunWithSocket(func(shell zmq4.Socket) error {
210 return receipt.SendResponse(shell, msg)
211 })
212}
213
214// PublishKernelStatus publishes a status message notifying front-ends of the state the kernel is in. Supports
215// states "starting", "busy", and "idle".

Callers 5

sendKernelInfoFunction · 0.80
handleExecuteRequestMethod · 0.80
handleShutdownRequestFunction · 0.80
handleCompleteRequestFunction · 0.80

Calls 3

SendResponseMethod · 0.95
NewMsgFunction · 0.85
RunWithSocketMethod · 0.80

Tested by

no test coverage detected