MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / RemoveSession

Method RemoveSession

internal/control/service.go:412–426  ·  view source on GitHub ↗
(sessionID string)

Source from the content-addressed store, hash-verified

410}
411
412func (s Service) RemoveSession(sessionID string) error {
413 session, err := s.InspectSession(sessionID)
414 if err != nil {
415 return err
416 }
417 if session.ContainerID != "" {
418 if err := s.removeRuntime(session.ContainerID); err != nil {
419 return err
420 }
421 }
422 _ = (egress.Service{DB: s.DB, Paths: s.Paths}).CloseForSession(sessionID)
423 now := time.Now().UTC().Format(time.RFC3339Nano)
424 _, err = s.DB.Exec(`UPDATE sessions SET status = 'removed', container_id = '', updated_at = ? WHERE id = ?`, now, sessionID)
425 return err
426}
427
428func (s Service) ResumeSnapshot(snapshotNameOrID, leaseID string) (string, error) {
429 var runID, taskPath string

Callers 2

runDockerAttemptMethod · 0.95
sessionCmdFunction · 0.45

Calls 4

InspectSessionMethod · 0.95
removeRuntimeMethod · 0.95
CloseForSessionMethod · 0.80
ExecMethod · 0.65

Tested by

no test coverage detected