Documentation ¶
Index ¶
- Variables
- type RootModule
- type Socket
- func (s *Socket) Close(args ...goja.Value)
- func (s *Socket) On(event string, handler goja.Value)
- func (s *Socket) Ping()
- func (s *Socket) Send(message string)
- func (s *Socket) SendBinary(message goja.Value)
- func (s *Socket) SetInterval(fn goja.Callable, intervalMs float64) error
- func (s *Socket) SetTimeout(fn goja.Callable, timeoutMs float64) error
- type WS
- type WSHTTPResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWSInInitContext = common.NewInitContextError("using websockets in the init context is not supported")
ErrWSInInitContext is returned when websockets are using in the init context
Functions ¶
This section is empty.
Types ¶
type RootModule ¶ added in v0.36.0
type RootModule struct{}
RootModule is the global module instance that will create module instances for each VU.
func New ¶ added in v0.18.0
func New() *RootModule
New returns a pointer to a new RootModule instance.
func (*RootModule) NewModuleInstance ¶ added in v0.36.0
func (*RootModule) NewModuleInstance(m modules.VU) modules.Instance
NewModuleInstance implements the modules.Module interface to return a new instance for each VU.
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
func (*Socket) SendBinary ¶ added in v0.32.0
SendBinary writes the given ArrayBuffer message to the connection.
func (*Socket) SetInterval ¶
SetInterval executes the provided function inside the socket's event loop each interval time, which is in ms
type WS ¶
type WS struct {
// contains filtered or unexported fields
}
WS represents a module instance of the WebSocket module.
Click to show internal directories.
Click to hide internal directories.