SetRemotes sets the complete set of remotes on the given tailnet domain using a map of name -> url. If transport is specified, that transport will be used to connect to these remotes.
(domain string, remotes []*drive.Remote, transport http.RoundTripper)
| 74 | // using a map of name -> url. If transport is specified, that transport |
| 75 | // will be used to connect to these remotes. |
| 76 | func (s *FileSystemForLocal) SetRemotes(domain string, remotes []*drive.Remote, transport http.RoundTripper) { |
| 77 | children := make([]*compositedav.Child, 0, len(remotes)) |
| 78 | for _, remote := range remotes { |
| 79 | children = append(children, &compositedav.Child{ |
| 80 | Child: &dirfs.Child{ |
| 81 | Name: remote.Name, |
| 82 | Available: remote.Available, |
| 83 | }, |
| 84 | BaseURL: func() (string, error) { return remote.URL(), nil }, |
| 85 | Transport: transport, |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | s.h.SetChildren(domain, children...) |
| 90 | } |
| 91 | |
| 92 | // Close() stops serving the WebDAV content |
| 93 | func (s *FileSystemForLocal) Close() error { |
nothing calls this directly
no test coverage detected