Skip to content
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

Create interface with Goja for disruptor API #45

Closed
pablochacin opened this issue Nov 14, 2022 · 0 comments · Fixed by #92
Closed

Create interface with Goja for disruptor API #45

pablochacin opened this issue Nov 14, 2022 · 0 comments · Fixed by #92
Milestone

Comments

@pablochacin
Copy link
Collaborator

pablochacin commented Nov 14, 2022

Presently the Disruptor interface in golang is directly exposed to JS. This creates several inconvenients:

  • Struct fields are passed with the wrong type
  • If a struct field is misspelled this is not detected as an error creating a confusing experience for user (see Add selector validation #41)
  • There is no support for Duration type in JS so parameters and struct fields that specify a duration must be defined either as integers with a predefined unit (seconds, mil;seconds) or as strings converted to duration in the Disruptor code

In order to address the issues mentioned above, it would be convenient to create an interface that is aware of the goja type system and validates the parameters received, making any necessary conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant