-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow one pseudo-JS module to access the ModuleInstance of another module #2293
Labels
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
refactor
Comments
na--
added
refactor
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
labels
Dec 13, 2021
As a bonus, the lengthy initialization of HTTP-specific things that currently happens during VU init: Lines 157 to 224 in 922c963
Would be moved to a much more appropriate place in the Lines 69 to 72 in 8a475ab
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
refactor
(Extracted from #2226, and somewhat connected to #2258 and #1802)
It would be quite nice if one pseudo-JS module is able to access the
modules.Instance
of another module. For example, ifk6/ws
is able to access the module instance ofk6/http
, though ideally any module (regardless of built-in or extension) should be able to access any other module.This will allow us to move a lot of the (mostly) HTTP-specific cruft from
lib.State
to a much more appropriate place:k6/lib/state.go
Lines 56 to 63 in 922c963
But still allow other parts of the codebase (like
k6/ws
andk6/grpc
) to access the default HTTP transport or cookie jar, when they need to.The text was updated successfully, but these errors were encountered: