Documentation ¶
Overview ¶
Package protocol contains the definition of the objects that are serialized and communicated to the kernel, using the standard Go `encoding/gob` package.
Index ¶
Constants ¶
View Source
const ( MIMETextHTML MIMEType = "text/html" MIMETextJavascript = "text/javascript" MIMETextMarkdown = "text/markdown" MIMETextPlain = "text/plain" MIMEImagePNG = "image/png" MIMEImageSVG = "image/svg+xml" )
View Source
const GONB_PIPE_ENV = "GONB_PIPE"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayData ¶
type DisplayData struct { // Data maps MIME Type to content. Content depends on the mime type. Usually either string or []byte. Data map[MIMEType]any // Metadata is a generic dictionary of Go basic data (usually strings and numbers). According to the docs, // the only metadata keys currently defined in IPython are the width and height of images. Metadata map[string]any // DisplayID is a "transient" (see doc) information about which id to display something. It's used to // overwrite some previous content. So far tested only with HTML. A program should always generate // unique IDs to start with, and then re-use them to update them. If set, after the first time that it's // used, it will trigger the use of the `update_display_data` as opposed to `display_data` message. DisplayID string }
DisplayData mimics the contents of the "display_data" message used by Jupyter, see https://jupyter-client.readthedocs.io/en/latest/messaging.html
Click to show internal directories.
Click to hide internal directories.