Documentation ¶
Overview ¶
Package juno implements the messaging spec of the Jupyter Messaging Protocol, just for you. http://jupyter-client.readthedocs.org/en/latest/messaging.html
Index ¶
- Constants
- func NewUUID() string
- type ConnectionInfo
- func (connInfo *ConnectionInfo) ConnectionString(port int) string
- func (connInfo *ConnectionInfo) ControlConnectionString() string
- func (connInfo *ConnectionInfo) HBConnectionString() string
- func (connInfo *ConnectionInfo) IOPubConnectionString() string
- func (connInfo *ConnectionInfo) ShellConnectionString() string
- func (connInfo *ConnectionInfo) StdinConnectionString() string
- type Message
- type MessageHeader
- type MimeBundle
Constants ¶
const DELIMITER = "<IDS|MSG>"
DELIMITER denotes the Jupyter multipart message
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { IOPubPort int `json:"iopub_port"` StdinPort int `json:"stdin_port"` IP string `json:"ip"` Transport string `json:"transport"` HBPort int `json:"hb_port"` SignatureScheme string `json:"signature_scheme"` ShellPort int `json:"shell_port"` ControlPort int `json:"control_port"` Key string `json:"key"` }
ConnectionInfo represents the runtime connection data used by Jupyter kernels
func NewConnectionInfo ¶
func NewConnectionInfo(filename string) (ConnectionInfo, error)
NewConnectionInfo reads in a connection file and creates a ConnectionInfo struct
func (*ConnectionInfo) ConnectionString ¶
func (connInfo *ConnectionInfo) ConnectionString(port int) string
ConnectionString forms the string for zmq libraries to connect
func (*ConnectionInfo) ControlConnectionString ¶
func (connInfo *ConnectionInfo) ControlConnectionString() string
func (*ConnectionInfo) HBConnectionString ¶
func (connInfo *ConnectionInfo) HBConnectionString() string
func (*ConnectionInfo) IOPubConnectionString ¶
func (connInfo *ConnectionInfo) IOPubConnectionString() string
IOPubConnectionString forms the connection string for the IOPub socket This is simply a wrapper around ConnectionString with the IOPub port
func (*ConnectionInfo) ShellConnectionString ¶
func (connInfo *ConnectionInfo) ShellConnectionString() string
func (*ConnectionInfo) StdinConnectionString ¶
func (connInfo *ConnectionInfo) StdinConnectionString() string
type Message ¶
type Message struct { Header MessageHeader `json:"header"` ParentHeader MessageHeader `json:"parent_header"` Metadata map[string]interface{} `json:"metadata"` Content map[string]interface{} `json:"content"` }
Message is a generic Jupyter message (not a wire message) http://jupyter-client.readthedocs.org/en/latest/messaging.html#general-message-format
func ExecuteRequest ¶
ExecuteRequest sends an execution request to the Jupyter kernel
func (*Message) ParseWireProtocol ¶
func (m *Message) ParseWireProtocol(wireMessage [][]byte, connInfo ConnectionInfo) (err error)
ParseWireProtocol fills a Message with all the juicy Jupyter bits
type MessageHeader ¶
type MessageHeader struct { MessageID string `json:"msg_id"` Username string `json:"username"` Session string `json:"session"` MessageType string `json:"msg_type"` Version string `json:"version"` }
MessageHeader is a Jupyter message header http://jupyter-client.readthedocs.org/en/latest/messaging.html
type MimeBundle ¶
MimeBundle is a collection of `mimetypes -> data` Example:
'text/html' -> '<h1>Hey!</h1>' 'image/png' -> 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'