MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / Publish

Method Publish

messages.go:186–197  ·  view source on GitHub ↗

Publish creates a new ComposedMsg and sends it back to the return identities over the IOPub channel.

(msgType string, content interface{})

Source from the content-addressed store, hash-verified

184// Publish creates a new ComposedMsg and sends it back to the return identities over the
185// IOPub channel.
186func (receipt *msgReceipt) Publish(msgType string, content interface{}) error {
187 msg, err := NewMsg(msgType, receipt.Msg)
188
189 if err != nil {
190 return err
191 }
192
193 msg.Content = content
194 return receipt.Sockets.IOPubSocket.RunWithSocket(func(iopub zmq4.Socket) error {
195 return receipt.SendResponse(iopub, msg)
196 })
197}
198
199// Reply creates a new ComposedMsg and sends it back to the return identities over the
200// Shell channel.

Callers 6

PublishKernelStatusMethod · 0.95
PublishExecutionInputMethod · 0.95
PublishExecutionErrorMethod · 0.95
PublishDisplayDataMethod · 0.95
PublishWriteStreamMethod · 0.95

Calls 3

SendResponseMethod · 0.95
NewMsgFunction · 0.85
RunWithSocketMethod · 0.80

Tested by

no test coverage detected