Documentation
¶
Index ¶
- Constants
- Variables
- type Factory
- type IpcFunc
- type Message
- type Pool
- type Process
- func (p *Process) Alive() <-chan struct{}
- func (p *Process) Checkpoint(timeout time.Duration) error
- func (p *Process) Close() error
- func (p *Process) Console() []byte
- func (p *Process) Eval(code string, opts map[string]interface{}) (interface{}, error)
- func (p *Process) GetVersion(what string) string
- func (p *Process) Kill()
- func (p *Process) Log(msg string, args ...interface{})
- func (p *Process) MakeResponse() (string, chan map[string]interface{})
- func (p *Process) Run(code string, opts map[string]interface{})
- func (p *Process) Set(v string, val interface{})
- func (p *Process) SetContext(ctx context.Context)
- func (p *Process) SetIPC(name string, f IpcFunc)
Constants ¶
View Source
const CREATE_NO_WINDOW = 0x08000000
Variables ¶
View Source
var (
ErrTimeout = errors.New("nodejs: timeout reached")
)
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
type Message ¶
type Message struct {
Action string `json:"action"`
Data pjson.RawMessage `json:"data"`
Id int64 `json:"id"`
}
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Take ¶
Take returns a Process from the pool and will wait until one is available, unless the context is cancelled.
func (*Pool) TakeIfAvailable ¶
TakeIfAvailable returns a Process if any is available, or nil if not
type Process ¶
func (*Process) GetVersion ¶
func (*Process) MakeResponse ¶
func (*Process) SetContext ¶
Click to show internal directories.
Click to hide internal directories.