Documentation
¶
Index ¶
- Variables
- func NewSession(name string) (*session, error)
- func NewSessionManager() *sessionManager
- type ConnectReply
- type ErrMsg
- type HandlerFunction
- type Kernel
- func (k *Kernel) HandleCommClose(receipt message.Receipt) error
- func (k *Kernel) HandleCommInfoRequest(receipt message.Receipt) error
- func (k *Kernel) HandleCommMessage(receipt message.Receipt) error
- func (k *Kernel) HandleCommOpen(receipt message.Receipt) error
- func (k *Kernel) HandleConnectRequest(receipt message.Receipt) error
- func (k *Kernel) HandleExecuteRequest(receipt message.Receipt) error
- func (k *Kernel) HandleKernelInfoRequest(receipt message.Receipt) error
- func (k *Kernel) HandleShellMsg(receipt message.Receipt) error
- func (k *Kernel) HandleShutdownRequest(receipt message.Receipt) error
- func (k *Kernel) HandleWithStatus(receipt message.Receipt, handler HandlerFunction) error
- func (k *Kernel) Run() error
- func (k *Kernel) Shutdown() error
- func (k *Kernel) Start() error
- func (k *Kernel) Stop() error
- func (k *Kernel) Wait() error
- type KernelInfo
- type KernelLanguageInfo
- type KernelStatus
- type OutputMsg
- type ShutdownReply
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultSessionManager *sessionManager
)
Functions ¶
func NewSession ¶ added in v0.2.11
func NewSessionManager ¶ added in v0.2.11
func NewSessionManager() *sessionManager
Types ¶
type ConnectReply ¶
type ConnectReply struct { ShellPort int `json:"shell_port"` IOPubPort int `json:"iopub_port"` StdinPort int `json:"stdin_port"` HBPort int `json:"hb_port"` }
ConnectReply encodes the ports necessary for connecting to the kernel
type ErrMsg ¶
type ErrMsg struct { EName string `json:"ename"` EValue string `json:"evalue"` Traceback []string `json:"traceback"` }
ErrMsg encodes the traceback of errors output to the notebook
type HandlerFunction ¶
type Kernel ¶
type Kernel struct { ExecCounter int // contains filtered or unexported fields }
func (*Kernel) HandleCommClose ¶ added in v0.2.11
func (*Kernel) HandleCommInfoRequest ¶ added in v0.2.11
func (*Kernel) HandleCommMessage ¶ added in v0.2.11
func (*Kernel) HandleCommOpen ¶ added in v0.2.11
func (*Kernel) HandleConnectRequest ¶
func (*Kernel) HandleExecuteRequest ¶
HandleExecuteRequest runs code from an execute_request method, and sends the various reply messages.
func (*Kernel) HandleKernelInfoRequest ¶
SendKernelInfo sends a kernel_info_reply message.
func (*Kernel) HandleShellMsg ¶
HandleShellMsg responds to a message on the shell ROUTER socket.
func (*Kernel) HandleShutdownRequest ¶
HandleShutdownRequest sends a "shutdown" message
func (*Kernel) HandleWithStatus ¶
func (k *Kernel) HandleWithStatus(receipt message.Receipt, handler HandlerFunction) error
type KernelInfo ¶
type KernelInfo struct { // Version of messaging protocol. // The first integer indicates major version. It is incremented when // there is any backward incompatible change. // The second integer indicates minor version. It is incremented when // there is any backward compatible change. ProtocolVersion string `json:"protocol_version"` // The kernel implementation name // (e.g. 'ipython' for the IPython kernel) Implementation string `json:"implementation"` // Implementation version number. // The version number of the kernel's implementation //(e.g. IPython.__version__ for the IPython kernel) ImplementationVersion string `json:"implementation_version"` // Information about the language of code for the kernel LanguageInfo KernelLanguageInfo `json:"language_info"` // A banner of information about the kernel, // which may be desplayed in console environments. Banner string `json:"banner"` }
KernelInfo holds information about the igo kernel, for kernel_info_reply messages.
type KernelLanguageInfo ¶
type KernelLanguageInfo struct { // Name of the programming language that the kernel implements. // Kernel included in IPython returns 'python'. Name string `json:"name"` // Language version number. // It is Python version number (e.g., '2.7.3') for the kernel // included in IPython. Version string `json:"version"` // mimetype for script files in this language Mimetype string `json:"mimetype"` // Extension including the dot, e.g. '.py' FileExtension string `json:"file_extension"` //Pygments lexer, for highlighting // Only needed if it differs from the 'name' field. PpygmentsLexer string `json:"pygments_lexer,omitempty"` // Codemirror mode, for for highlighting in the notebook. // Only needed if it differs from the 'name' field. CodeMirrorMode string `json:"codemirror_mode,omitempty"` }
type KernelStatus ¶
type KernelStatus struct {
ExecutionState string `json:"execution_state"`
}
KernelStatus holds a kernel state, for status broadcast messages.
type OutputMsg ¶
type OutputMsg struct { Execcount int `json:"execution_count"` Data map[string]string `json:"data"` Metadata map[string]interface{} `json:"metadata"` }
OutputMsg holds the data for a pyout message.
type ShutdownReply ¶
type ShutdownReply struct {
Restart bool `json:"restart"`
}
ShutdownReply encodes a boolean indication of shutdown/restart
Click to show internal directories.
Click to hide internal directories.