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

Support multiple simultaneous connections #40

Open
BohdanPetryshyn opened this issue Jun 3, 2023 · 0 comments
Open

Support multiple simultaneous connections #40

BohdanPetryshyn opened this issue Jun 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@BohdanPetryshyn
Copy link
Collaborator

BohdanPetryshyn commented Jun 3, 2023

Summary

Sometimes you need to connect to multiple resources in your remote environment simultaneously. Currently, you need to run Basti multiple times in separate terminal windows. Being able to connect to multiple targets with a single Basti command would be useful.

Solution

UX

In interactive (basti connect) and automatic (basti connect <options>) modes, multiple target selection will become cumbersome. Multiconnect should only be supported in the predefined connection mode, when all the connection targets are defined in a configuration file.

A new top-level field "connection-groups" (the name is discussable) has to be introduced. The field will reference multiple connections. The connections might also be inlined like with target inlining.

connection-groups:
  prod:
    connections:
      - database-prod
      - cache-prod
  dev:
    connections:
      - database-dev
      - cache-dev

connections:
  database-dev:
    ...
  database-prod:
    ...
  cache-dev:
    ...
  cache-prod:
    ...

Connection groups and connection names must be unique. In other words, a connection group can't have the same name as a connection. This will allow to keep the connection command concise:

basti connect <connection | connection-group>

Tracking multiple connections

Basti must track and display the statuses of all the simultaneous connections. The application must exit when at least one of the connections dies.

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

No branches or pull requests

1 participant