Documentation ¶
Overview ¶
Package lang implements the language runtime
Index ¶
- Variables
- func IsX(v interface{}) bool
- func NewBytesConn(addr string) n.Conn
- func NewError(fmt_ string, arg_ ...interface{}) error
- func NewSandbox() n.Transport
- func PermRef(v interface{}) circuit.PermX
- func ReadWriterConn(addr n.Addr, rwc io.ReadWriteCloser) n.Conn
- func Ref(v interface{}) circuit.X
- type Runtime
- func (r *Runtime) Dial(addr n.Addr, service string) circuit.PermX
- func (r *Runtime) DialSelf(service string) interface{}
- func (r *Runtime) Export(val ...interface{}) interface{}
- func (r *Runtime) Hang()
- func (r *Runtime) Import(exported interface{}) ([]interface{}, string, error)
- func (r *Runtime) Kill(addr n.Addr) error
- func (r *Runtime) Listen(service string, receiver interface{})
- func (*Runtime) PermRef(v interface{}) circuit.PermX
- func (*Runtime) Ref(v interface{}) circuit.X
- func (r *Runtime) RegisterFunc(fn circuit.Func)
- func (r *Runtime) RegisterValue(v interface{})
- func (r *Runtime) RunInBack(fn func())
- func (r *Runtime) ServerAddr() n.Addr
- func (r *Runtime) SetBoot(v interface{})
- func (r *Runtime) Spawn(host worker.Host, anchor []string, fn circuit.Func, in ...interface{}) (retrn []interface{}, addr n.Addr, err error)
- func (r *Runtime) TryDial(addr n.Addr, service string) (circuit.PermX, error)
Constants ¶
This section is empty.
Variables ¶
var ErrParse = NewError("parse")
var ErrTypeID = NewError("importing handle with unregistered type")
Functions ¶
func NewBytesConn ¶
func NewSandbox ¶
NewSandbox creates a new transport instance, part of a sandbox network in memory
func ReadWriterConn ¶
ReadWriterConn converts an io.ReadWriteCloser into a Conn
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime represents that state of the circuit program at the present moment. This state can change in two ways: by a 'linguistic' action ...
func (*Runtime) Dial ¶
Dial returns an ptr to the permanent xvalue of the addressed remote runtime. It panics if any errors get in the way.
func (*Runtime) Ref ¶
Ref annotates a user value v, so that if the returned value is consequently passed cross-runtime, the runtime will pass v as via a cross-runtime pointer rather than by value.
func (*Runtime) RegisterFunc ¶
func (*Runtime) RegisterValue ¶
func (r *Runtime) RegisterValue(v interface{})
func (*Runtime) RunInBack ¶
func (r *Runtime) RunInBack(fn func())
RunInBack can only be invoked inside a serveGo. For the user, this means that RunInBack can be called inside functions that are invoked via circuit.Spawn