feat(portforwarding): allow running script upon port forwarding success (#2399)

This commit is contained in:
Alex Lavallee
2024-11-10 03:49:02 -05:00
committed by GitHub
parent e69966381d
commit a035a151bd
15 changed files with 480 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ type Service struct {
client *http.Client
portAllower PortAllower
logger Logger
cmder Cmder
// Internal channels and locks
startStopMutex sync.Mutex
keepPortCancel context.CancelFunc
@@ -26,7 +27,7 @@ type Service struct {
}
func New(settings Settings, routing Routing, client *http.Client,
portAllower PortAllower, logger Logger, puid, pgid int,
portAllower PortAllower, logger Logger, cmder Cmder, puid, pgid int,
) *Service {
return &Service{
// Fixed parameters
@@ -38,6 +39,7 @@ func New(settings Settings, routing Routing, client *http.Client,
client: client,
portAllower: portAllower,
logger: logger,
cmder: cmder,
}
}