Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

proxy: add LocalAddr() method #52

Merged
merged 1 commit into from
Mar 2, 2021
Merged

proxy: add LocalAddr() method #52

merged 1 commit into from
Mar 2, 2021

Conversation

fatih
Copy link
Member

@fatih fatih commented Mar 2, 2021

This method exposes the underlying listener's local address. It will be useful to get the address if the listener binds to an address in the form "127.0.0.1:0", which picks up a random port.

/xref https://github.com/planetscale/project-big-bang/issues/111

@fatih fatih requested a review from a team as a code owner March 2, 2021 10:14
@fatih fatih force-pushed the fatih/add-local-addr branch from ff61e7b to fce701a Compare March 2, 2021 10:27
This method exposes the underlying listener's local address. It will be
useful to get the address if the listener binds to an address in the
form "127.0.0.1:0", which picks up a random port.

/xref planetscale/surfaces#111
@fatih fatih force-pushed the fatih/add-local-addr branch from fce701a to c82065c Compare March 2, 2021 10:28
@fatih fatih merged commit fd7bb8b into main Mar 2, 2021
@fatih fatih deleted the fatih/add-local-addr branch March 2, 2021 10:30
fatih added a commit to planetscale/cli that referenced this pull request Mar 2, 2021
This PR changes the address to bind locally. Instead of binding to an
hardcoded port, we now let the OS pick up a random port for us. In order
to make this work, we had to introduce a new method to the `sql-proxy`
repo (planetscale/sql-proxy#52).

Both `pscale shell` and `pscale connect` now automatically binds to a
random port.

closes planetscale/surfaces#111
fatih added a commit to planetscale/cli that referenced this pull request Mar 2, 2021
This PR changes the address to bind locally. Instead of binding to an
hardcoded port, we now let the OS pick up a random port for us. In order
to make this work, we had to introduce a new method to the `sql-proxy`
repo (planetscale/sql-proxy#52).

Both `pscale shell` and `pscale connect` now automatically binds to a
random port.

closes planetscale/surfaces#111
asbiaidw5 added a commit to asbiaidw5/cli that referenced this pull request Aug 6, 2024
This PR changes the address to bind locally. Instead of binding to an
hardcoded port, we now let the OS pick up a random port for us. In order
to make this work, we had to introduce a new method to the `sql-proxy`
repo (planetscale/sql-proxy#52).

Both `pscale shell` and `pscale connect` now automatically binds to a
random port.

closes planetscale/surfaces#111
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants