Documentation
¶
Overview ¶
Package js the JavaScript implementation
Index ¶
- Constants
- Variables
- func EnableConsole(vm *goja.Runtime)
- func Run(ctx context.Context, p common.Program) (goja.Value, error)
- func RunString(ctx context.Context, script string) (goja.Value, error)
- func SetScheduler(s Scheduler)
- type Cat
- func (c *Cat) Cancel()
- func (c *Cat) ClearVar()
- func (c *Cat) GetElement(key string, value any, arg string) (str string, err error)
- func (c *Cat) GetElements(key string, value any, arg string) (str []string, err error)
- func (c *Cat) GetString(key string, value any, arg string) (str string, err error)
- func (c *Cat) GetStrings(key string, value any, arg string) (str []string, err error)
- func (c *Cat) GetVar(call goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (c *Cat) Log(call goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (c *Cat) SetVar(key string, value goja.Value) error
- type Options
- type Scheduler
- type VM
Constants ¶
View Source
const ( // DefaultMaxTimeToWaitGetVM default retries time DefaultMaxTimeToWaitGetVM = 500 * time.Millisecond // DefaultMaxRetriesGetVM default retries times DefaultMaxRetriesGetVM = 3 )
Variables ¶
View Source
var ( // ErrSchedulerClosed the scheduler is closed error ErrSchedulerClosed = errors.New("scheduler is closed") )
Functions ¶
Types ¶
type Cat ¶
Cat an analyzer context
func (*Cat) Cancel ¶
func (c *Cat) Cancel()
Cancel this context releases resources associated with it, so code should call cancel as soon as the operations running in this Context complete.
func (*Cat) GetElement ¶
GetElement gets the string of the content with the given arguments
func (*Cat) GetElements ¶
GetElements gets the string of the content with the given arguments
func (*Cat) GetStrings ¶
GetStrings gets the string of the content with the given arguments
func (*Cat) GetVar ¶
GetVar returns the value associated with this context for key, or nil if no value is associated with key.
type Options ¶
type Options struct {
InitialVMs int `yaml:"initial-vms"`
MaxVMs int `yaml:"max-vms"`
MaxRetriesGetVM int `yaml:"max-retries-get-vm"`
MaxTimeToWaitGetVM time.Duration `yaml:"max-time-to-wait-get-vm"`
UseStrict bool `yaml:"use-strict"`
ModulePath []string `yaml:"module-path"`
}
Options Scheduler options
Directories
¶
| Path | Synopsis |
|---|---|
|
Package common the js common
|
Package common the js common |
|
Package modules the JS module
|
Package modules the JS module |
|
cache
Package cache the cache JS implementation
|
Package cache the cache JS implementation |
|
cookie
Package cookie the cookie JS implementation
|
Package cookie the cookie JS implementation |
|
crypto
Package crypto the crypto JS implementation
|
Package crypto the crypto JS implementation |
|
encoding
Package encoding the encoding JS implementation
|
Package encoding the encoding JS implementation |
|
http
Package http the http JS implementation
|
Package http the http JS implementation |
|
Package modulestest the module test vm
|
Package modulestest the module test vm |
Click to show internal directories.
Click to hide internal directories.