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

Method launchSession

internal/manager/manager.go:302–315  ·  view source on GitHub ↗

launchSession creates a new session using the launcher

(ctx context.Context)

Source from the content-addressed store, hash-verified

300
301// launchSession creates a new session using the launcher
302func (cm *ConnManager) launchSession(ctx context.Context) (*Session, error) {
303 sessionCtx, cancel := context.WithCancel(ctx)
304
305 session, err := cm.launcher.Launch(sessionCtx)
306 if err != nil {
307 cancel()
308 return nil, err
309 }
310
311 // Store the cancel function in the session
312 session.Cancel = cancel
313
314 return session, nil
315}
316
317// GetCurrent returns the current primary session
318func (cm *ConnManager) GetCurrent() *Session {

Callers 3

StartMethod · 0.95
launchPrimarySessionMethod · 0.95

Calls 1

LaunchMethod · 0.65

Tested by

no test coverage detected