MCPcopy Index your code
hub / github.com/kopia/kopia / deleteSourceManager

Method deleteSourceManager

internal/server/server.go:1028–1042  ·  view source on GitHub ↗
(ctx context.Context, src snapshot.SourceInfo)

Source from the content-addressed store, hash-verified

1026}
1027
1028func (s *Server) deleteSourceManager(ctx context.Context, src snapshot.SourceInfo) bool {
1029 s.serverMutex.Lock()
1030 sm := s.sourceManagers[src]
1031 delete(s.sourceManagers, src)
1032 s.serverMutex.Unlock()
1033
1034 if sm == nil {
1035 return false
1036 }
1037
1038 sm.stop(ctx)
1039 sm.waitUntilStopped()
1040
1041 return true
1042}
1043
1044func (s *Server) snapshotAllSourceManagers() map[snapshot.SourceInfo]*sourceManager {
1045 s.serverMutex.RLock()

Callers

nothing calls this directly

Calls 4

waitUntilStoppedMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65
stopMethod · 0.45

Tested by

no test coverage detected