MCPcopy
hub / github.com/rclone/rclone / getConnection

Method getConnection

backend/smb/filepool_test.go:31–42  ·  view source on GitHub ↗
(ctx context.Context, share string)

Source from the content-addressed store, hash-verified

29}
30
31func (m *mockFs) getConnection(ctx context.Context, share string) (*conn, error) {
32 m.mu.Lock()
33 defer m.mu.Unlock()
34 m.getConnectionCalled = true
35 if m.getConnectionErr != nil {
36 return nil, m.getConnectionErr
37 }
38 if m.getConnectionResult != nil {
39 return m.getConnectionResult, nil
40 }
41 return &conn{}, nil
42}
43
44func (m *mockFs) removeSession() {
45 m.mu.Lock()

Callers

nothing calls this directly

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected