-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Goja JSVM for Gateway #1961
Goja JSVM for Gateway #1961
Conversation
4edbc09
to
264eaac
Compare
dc3b443
to
e4b248d
Compare
@matiasinsaurralde would appreciate you looking over the plugin side of things - test all pass locally but are a bit flaky on ci still |
Looks like a vendoring issue to me, related to |
Yep i just broke it now when vendoring - it was a different issue before related to a timeout or hang. I'll fix vendoring then ping you again 👍 |
12c0eb8
to
eeae39d
Compare
We should also check the latest
|
f93d402
to
55b3444
Compare
a689f7d
to
0304fa5
Compare
@matiasinsaurralde PTAL |
Looks good, seems the timeout issue is fixed now! |
main.go
Outdated
@@ -466,13 +466,17 @@ func loadCustomMiddleware(spec *APISpec) ([]string, apidef.MiddlewareDefinition, | |||
mwPreFuncs := []apidef.MiddlewareDefinition{} | |||
mwPostFuncs := []apidef.MiddlewareDefinition{} | |||
mwPostKeyAuthFuncs := []apidef.MiddlewareDefinition{} | |||
mwDriver := apidef.OttoDriver | |||
|
|||
var mwDriver apidef.MiddlewareDriver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could default to otto
here and simplify the if
block:
mwDriver := apidef.OttoDriver
if config.Global().JSVM == "goja" {
mwDriver = apidef.GojaDriver
}
I wonder if we can refactor it a bit, since jsvm_goja.go and jsvm_otto.go contains almost idential code. |
I'll see where I can squeeze it down |
447fae2
to
dd07c80
Compare
… coprocess changes to fix tests
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, please add comments to this ticket if you would like it to stay open. Thank you for your contributions. |
For #1893
This PR introduces a new JSVM that can be used in Tyk.
In gateway config value is
enable_v2_jsvm