MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / New

Function New

internal/manager/manager.go:72–83  ·  view source on GitHub ↗

New creates a new ConnManager instance

(cfg *config.Config, launcher SessionLauncher)

Source from the content-addressed store, hash-verified

70
71// New creates a new ConnManager instance
72func New(cfg *config.Config, launcher SessionLauncher) *ConnManager {
73 return &ConnManager{
74 cfg: cfg,
75 launcher: launcher,
76 launchState: &LaunchState{},
77
78 // Resource management
79 shutdownCh: make(chan struct{}),
80 maxSessions: 10, // Configurable limit
81 maxGoroutines: 50, // Prevent goroutine explosion
82 }
83}
84
85// startGoroutine safely starts a goroutine with resource tracking
86func (cm *ConnManager) startGoroutine(name string, fn func()) error {

Callers 1

runProxyFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected