Documentation ¶
Index ¶
- type Process
- func (c *Process) Args() []string
- func (c *Process) Argv() []string
- func (c *Process) Cwd() string
- func (c *Process) Env() map[string]string
- func (c *Process) Exit(exitCode int) error
- func (c *Process) NextTick(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *Process) Platform() string
- func (c *Process) Stderr() stream.Writable
- func (c *Process) Stdin() stream.Readable
- func (c *Process) Stdout() stream.Writable
- func (c *Process) Task() *WorkerTask
- func (p *Process) V8Construct(in isolates.FunctionArgs)
- func (c *Process) V8FuncCwd(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *Process) V8FuncExit(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *Process) V8FuncNextTick(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *Process) V8GetArgs(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetArgv(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetEnv(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetPlatform(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetStderr(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetStdin(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetStdout(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetTask(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetVersion(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) V8GetVersions(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *Process) Version() (string, error)
- func (c *Process) Versions() *Versions
- type TaskOptions
- type Ticker
- type Versions
- type WorkerTask
- func (c *WorkerTask) ClearInterval(ticker int64)
- func (c *WorkerTask) ClearTimeout(timer int64)
- func (t *WorkerTask) Clone() (*WorkerTask, error)
- func (t *WorkerTask) ExitCode() int
- func (t *WorkerTask) GetExecutionContext() context.Context
- func (c *WorkerTask) GetIsolate() *isolates.Isolate
- func (t *WorkerTask) OnTerminate(callback func() error) func()
- func (c *WorkerTask) Ref()
- func (t *WorkerTask) SetExitCode(exitCode int)
- func (c *WorkerTask) SetInterval(ctx context.Context, callback *isolates.Value, duration time.Duration) (int64, error)
- func (c *WorkerTask) SetTimeout(callback *isolates.Value, duration time.Duration) (int64, error)
- func (t *WorkerTask) Start() error
- func (c *WorkerTask) Stats(ctx context.Context) (*isolates.Value, error)
- func (t *WorkerTask) Stop() error
- func (c *WorkerTask) Terminate()
- func (c *WorkerTask) TimeCounter(ctx context.Context) (*util.Counter, error)
- func (c *WorkerTask) Unref()
- func (c *WorkerTask) V8FuncClearInterval(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8FuncClearTimeout(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8FuncCreateTask(taskFS fs.FS, requires []string, taskPath string) (*WorkerTask, error)
- func (c *WorkerTask) V8FuncSetImmediate(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8FuncSetInterval(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)
- func (t *WorkerTask) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)
- func (t *WorkerTask) V8GetExitCode(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8GetStats(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *WorkerTask) V8GetTimeCounter(in isolates.GetterArgs) (*isolates.Value, error)
- func (t *WorkerTask) Wait(ctx context.Context) (int, error)
- type WorkerTaskStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct { *events.EventEmitterBase // contains filtered or unexported fields }
func NewProcess ¶
func NewProcess(t *WorkerTask) *Process
func (*Process) Task ¶
func (c *Process) Task() *WorkerTask
func (*Process) V8Construct ¶
func (p *Process) V8Construct(in isolates.FunctionArgs)
func (*Process) V8FuncExit ¶
func (*Process) V8FuncNextTick ¶
func (*Process) V8GetPlatform ¶
func (*Process) V8GetStderr ¶
func (*Process) V8GetStdin ¶
func (*Process) V8GetStdout ¶
func (*Process) V8GetVersion ¶
func (*Process) V8GetVersions ¶
type TaskOptions ¶
type TaskOptions struct { FS fs.FS Requires []string Script string Stdin io.ReadCloser Stdout io.WriteCloser Stderr io.WriteCloser Env map[string]string Arguments []string }
type WorkerTask ¶
func NewTask ¶
func NewTask(options TaskOptions) (*WorkerTask, error)
func (*WorkerTask) ClearInterval ¶
func (c *WorkerTask) ClearInterval(ticker int64)
func (*WorkerTask) ClearTimeout ¶
func (c *WorkerTask) ClearTimeout(timer int64)
func (*WorkerTask) Clone ¶
func (t *WorkerTask) Clone() (*WorkerTask, error)
func (*WorkerTask) ExitCode ¶
func (t *WorkerTask) ExitCode() int
func (*WorkerTask) GetExecutionContext ¶
func (t *WorkerTask) GetExecutionContext() context.Context
func (*WorkerTask) GetIsolate ¶
func (c *WorkerTask) GetIsolate() *isolates.Isolate
func (*WorkerTask) OnTerminate ¶
func (t *WorkerTask) OnTerminate(callback func() error) func()
func (*WorkerTask) Ref ¶
func (c *WorkerTask) Ref()
func (*WorkerTask) SetExitCode ¶
func (t *WorkerTask) SetExitCode(exitCode int)
func (*WorkerTask) SetInterval ¶
func (*WorkerTask) SetTimeout ¶
func (*WorkerTask) Start ¶
func (t *WorkerTask) Start() error
func (*WorkerTask) Stop ¶
func (t *WorkerTask) Stop() error
func (*WorkerTask) Terminate ¶
func (c *WorkerTask) Terminate()
func (*WorkerTask) TimeCounter ¶
func (*WorkerTask) Unref ¶
func (c *WorkerTask) Unref()
func (*WorkerTask) V8FuncClearInterval ¶
func (c *WorkerTask) V8FuncClearInterval(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8FuncClearTimeout ¶
func (c *WorkerTask) V8FuncClearTimeout(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8FuncCreateTask ¶
func (c *WorkerTask) V8FuncCreateTask(taskFS fs.FS, requires []string, taskPath string) (*WorkerTask, error)
func (*WorkerTask) V8FuncSetImmediate ¶
func (c *WorkerTask) V8FuncSetImmediate(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8FuncSetInterval ¶
func (c *WorkerTask) V8FuncSetInterval(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8FuncSetTimeout ¶
func (c *WorkerTask) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8FuncWait ¶
func (t *WorkerTask) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)
func (*WorkerTask) V8GetExitCode ¶
func (t *WorkerTask) V8GetExitCode(in isolates.GetterArgs) (*isolates.Value, error)
func (*WorkerTask) V8GetStats ¶
func (c *WorkerTask) V8GetStats(in isolates.GetterArgs) (*isolates.Value, error)
func (*WorkerTask) V8GetTimeCounter ¶
func (c *WorkerTask) V8GetTimeCounter(in isolates.GetterArgs) (*isolates.Value, error)
type WorkerTaskStats ¶
type WorkerTaskStats struct { Contexts int `v8:"contexts"` Values int `v8:"values"` Receivers int `v8:"receivers"` ComputeDuration time.Duration `v8:"computeDuration"` ComputeDuration5 time.Duration `v8:"computeDuration5"` ComputeDuration15 time.Duration `v8:"computeDuration15"` ComputeDuration30 time.Duration `v8:"computeDuration30"` ComputeDuration60 time.Duration `v8:"computeDuration60"` ComputeDuration120 time.Duration `v8:"computeDuration120"` DoesZapGarbage bool `v8:"doesZapGarbage"` HeapSizeLimit uint64 `v8:"heapSizeLimit"` MallocedMemory uint64 `v8:"mallocedMemory"` PeakMallocedMemory uint64 `v8:"peakMallocedMemory"` TotalAvailableSize uint64 `v8:"totalAvailableSize"` TotalHeapSize uint64 `v8:"totalHeapSize"` TotalHeapSizeExecutable uint64 `v8:"totalHeapSizeExecutable"` TotalPhysicalSize uint64 `v8:"totalPhysicalSize"` UsedHeapSize uint64 `v8:"usedHeapSize"` }
func NewWorkerTaskStats ¶
func NewWorkerTaskStats() *WorkerTaskStats
Click to show internal directories.
Click to hide internal directories.