feat: make PortRegistry interface segregation

This commit is contained in:
2026-07-13 02:42:21 +07:00
parent 43d1ec0e6d
commit f1df3d26c2
3 changed files with 19 additions and 13 deletions
+2 -3
View File
@@ -13,7 +13,6 @@ import (
"tunnel_pls/internal/session/slug"
"tunnel_pls/internal/types"
"tunnel_pls/internal/port"
"tunnel_pls/internal/registry"
proto "git.fossy.my.id/bagas/tunnel-please-grpc/gen"
@@ -889,12 +888,12 @@ func (m *mockLifecycle) SetChannel(channel ssh.Channel) error { return m.Called(
func (m *mockLifecycle) SetStatus(status types.SessionStatus) { m.Called(status) }
func (m *mockLifecycle) IsActive() bool { return m.Called().Bool(0) }
func (m *mockLifecycle) StartedAt() time.Time { return m.Called().Get(0).(time.Time) }
func (m *mockLifecycle) PortRegistry() port.Port {
func (m *mockLifecycle) PortRegistry() lifecycle.PortRegistry {
args := m.Called()
if args.Get(0) == nil {
return nil
}
return args.Get(0).(port.Port)
return args.Get(0).(lifecycle.PortRegistry)
}
type mockEventServiceClient struct {