Introduce self-healing SSH client with connection management#27
Open
fastrapier wants to merge 6 commits into
Open
Introduce self-healing SSH client with connection management#27fastrapier wants to merge 6 commits into
fastrapier wants to merge 6 commits into
Conversation
…d tunneling Signed-off-by: Daniil Studenikin <daniil.studenikin@flant.ru>
…lient implementation Signed-off-by: Daniil Studenikin <daniil.studenikin@flant.ru>
Signed-off-by: Daniil Studenikin <daniil.evgenyevich703@gmail.com>
…irect versions Signed-off-by: Daniil Studenikin <daniil.studenikin@flant.ru>
Signed-off-by: Daniil Studenikin <daniil.studenikin@flant.ru>
… logic Signed-off-by: Daniil Studenikin <daniil.studenikin@flant.ru>
Code Coverage OverviewLanguages: Go Go / code-coverage/goThe overall coverage in the branch is 5%. The coverage in the branch is 2%. Show a code coverage summary of the most impacted files.
Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new self-healing SSH client implementation in the
internal/infrastructure/ssh/v2package, alongside updates to documentation and dependencies. The new client separates connection strategy from operations, provides transparent reconnection, and is designed for extensibility and robust error handling. No existing consumers have been migrated yet; the legacy SSH client remains in place.Key changes:
New self-healing SSH client (
ssh/v2)internal/infrastructure/ssh/v2implementing a self-healing SSH client with a clear separation between connection strategy (viaDialerandRoute) and operations (currently tunneling, future support forRun/Upload). The client transparently handles reconnects, deduplicates concurrent reconnects usingsingleflight, and offers options for keepalive, retries, logging, and host key handling. The core logic is inclient.goandconn.go, with a generic executor for reconnect-aware operations. [1] [2]Documentation updates
docs/ARCHITECTURE.mdto describe the newssh/v2package, its design, API, and extension points. The documentation now distinguishes between the legacy SSH client and the new implementation, and details the responsibilities and structure of the new code. [1] [2] [3]docs/WORKLOG.mdsummarizing the introduction of the self-healing SSH client, its design, API, and test strategy.Dependency management
golang.org/x/syncas a direct dependency ingo.modto support the use ofsingleflightfor deduplicating concurrent reconnects.