(ctx context.Context, src snapshot.SourceInfo)
| 1011 | } |
| 1012 | |
| 1013 | func (s *Server) getOrCreateSourceManager(ctx context.Context, src snapshot.SourceInfo) *sourceManager { |
| 1014 | s.serverMutex.Lock() |
| 1015 | defer s.serverMutex.Unlock() |
| 1016 | |
| 1017 | if s.sourceManagers[src] == nil { |
| 1018 | userLog(ctx).Debugf("creating source manager for %v", src) |
| 1019 | sm := newSourceManager(src, s, s.rep) |
| 1020 | s.sourceManagers[src] = sm |
| 1021 | |
| 1022 | sm.start(ctx, s.isLocal(src)) |
| 1023 | } |
| 1024 | |
| 1025 | return s.sourceManagers[src] |
| 1026 | } |
| 1027 | |
| 1028 | func (s *Server) deleteSourceManager(ctx context.Context, src snapshot.SourceInfo) bool { |
| 1029 | s.serverMutex.Lock() |
nothing calls this directly
no test coverage detected