refactor: explicit initialization and dependency injection #70

Merged
bagas merged 1 commits from staging into main 2026-01-18 21:46:59 +07:00
Owner
  • Replace init() with config.Load() function when loading env variables
  • Inject portRegistry into session, server, and lifecycle structs
  • Inject sessionRegistry directly into interaction and lifecycle
  • Remove SetSessionRegistry function and global port variables
  • Pass ssh.Conn directly to forwarder constructor instead of lifecycle interface
  • Pass user and closeFunc callback to interaction constructor instead of lifecycle interface
  • Eliminate circular dependencies between lifecycle, forwarder, and interaction
  • Remove setter methods (SetLifecycle) from forwarder and interaction interfaces
- Replace init() with config.Load() function when loading env variables - Inject portRegistry into session, server, and lifecycle structs - Inject sessionRegistry directly into interaction and lifecycle - Remove SetSessionRegistry function and global port variables - Pass ssh.Conn directly to forwarder constructor instead of lifecycle interface - Pass user and closeFunc callback to interaction constructor instead of lifecycle interface - Eliminate circular dependencies between lifecycle, forwarder, and interaction - Remove setter methods (SetLifecycle) from forwarder and interaction interfaces
bagas added 1 commit 2026-01-18 21:09:28 +07:00
refactor: explicit initialization and dependency injection
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Has been cancelled
7a20e43e6b
- Replace init() with config.Load() function when loading env variables
- Inject portRegistry into session, server, and lifecycle structs
- Inject sessionRegistry directly into interaction and lifecycle
- Remove SetSessionRegistry function and global port variables
- Pass ssh.Conn directly to forwarder constructor instead of lifecycle interface
- Pass user and closeFunc callback to interaction constructor instead of lifecycle interface
- Eliminate circular dependencies between lifecycle, forwarder, and interaction
- Remove setter methods (SetLifecycle) from forwarder and interaction interfaces
bagas force-pushed staging from 7a20e43e6b to cdfe81baed 2026-01-18 21:09:51 +07:00 Compare
bagas force-pushed staging from cdfe81baed to 761139d626 2026-01-18 21:19:11 +07:00 Compare
bagas force-pushed staging from 761139d626 to 44d224f491 2026-01-18 21:20:07 +07:00 Compare
bagas merged commit 41fdb5639c into main 2026-01-18 21:46:59 +07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bagas/tunnel-please#70