feat: make PortRegistry interface segregation
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user