Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModuleInstance ¶
type ModuleInstance struct {
// contains filtered or unexported fields
}
ModuleInstance represents an instance of the JS module.
func (*ModuleInstance) EmailClient ¶
func (mi *ModuleInstance) EmailClient(call sobek.ConstructorCall) *sobek.Object
EmailClient is the JS constructor for the email client. It accepts email, password, url, and port as arguments. Usage: const client = new Imap.Client(email, password, url, port);
func (*ModuleInstance) Exports ¶
func (mi *ModuleInstance) Exports() modules.Exports
Exports implements the modules.Instance interface and returns the exports of the JS module. Creiamo esplicitamente un oggetto default che contiene Client come proprietà Questo permette "import Imap from 'k6/x/imap'" e poi "new Imap.Client(...)"
type RootModule ¶
type RootModule struct{}
RootModule is the global module instance that will create ModuleInstance instances for each VU.
func (*RootModule) NewModuleInstance ¶
func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance
NewModuleInstance implements the modules.Module interface and returns a new instance for each VU.