MCPcopy
hub / github.com/1Panel-dev/KubePi / Set

Method Set

pkg/terminal/shell.go:156–161  ·  view source on GitHub ↗

Set store a TerminalSession to SessionMap

(sessionId string, session TerminalSession)

Source from the content-addressed store, hash-verified

154
155// Set store a TerminalSession to SessionMap
156func (sm *SessionMap) Set(sessionId string, session TerminalSession) {
157 sm.Lock.Lock()
158 defer sm.Lock.Unlock()
159 session.TimeOut = time.Now().Add(SessionTerminalStoreTime * time.Minute)
160 sm.Sessions[sessionId] = session
161}
162
163// Close shuts down the SockJS connection and sends the status code and reason to the client
164// Can happen if the process exits or if there is an error starting up the process

Callers 15

RunMigrateFunction · 0.45
AddMethod · 0.45
ApplyDefaultValuesFunction · 0.45
ApplyFlagsFunction · 0.45
wrapHeadersMethod · 0.45
wrapBasicAuthMethod · 0.45
handleAuthTokenMethod · 0.45
handleConfigMethod · 0.45
handleKubeConfigApiMethod · 0.45
handleKubeTokenApiMethod · 0.45
ReadMethod · 0.45
WriteMethod · 0.45

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected