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

Change .connect() api #225

Merged
merged 7 commits into from
Feb 23, 2024

Conversation

mattyg
Copy link
Member

@mattyg mattyg commented Jan 28, 2024

It feels very weird that we have to pass a url of new URL('ws://UNUSED') to setup a websocket connection within a launcher environment.

This PR:

  • makes all api .connect() functions take an optional options object, which contains optional properties: url and defaultTimeout
  • makes the connect function throw an error if the url is not defined by parameter, nor by launcher env
  • changes the order of parameters in the AppAgentWebsocket.connect function, so the required parameter goes first

This would be a breaking change.

@mattyg mattyg changed the title Allow undefined url parameter in connect functions wip: Allow undefined url parameter in connect functions Jan 28, 2024
@mattyg mattyg changed the title wip: Allow undefined url parameter in connect functions Change .connect() api Feb 13, 2024
@mattyg
Copy link
Member Author

mattyg commented Feb 14, 2024

Let me know what you think @jost-s -- we might also want to get some feedback first.

@jost-s
Copy link
Contributor

jost-s commented Feb 16, 2024

Sorry @mattyg for not getting back to you. I don't know what happened, I saw the PR a while ago.

It looks fine to me, I'm happy with your proposal. I'll check with Holo and Components but don't think they'll object.

@mattyg
Copy link
Member Author

mattyg commented Feb 23, 2024

heads up @jost-s I don't actually have permissions to merge this -- if you were waiting on me

@jost-s
Copy link
Contributor

jost-s commented Feb 23, 2024

No, I've just been ill.

@jost-s jost-s merged commit 7d1cc0c into holochain:develop Feb 23, 2024
10 checks passed
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 this pull request may close these issues.

2 participants