MCPcopy Create free account
hub / github.com/tailscale/tailscale / SetRemotes

Method SetRemotes

drive/driveimpl/local_impl.go:76–90  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

74// using a map of name -> url. If transport is specified, that transport
75// will be used to connect to these remotes.
76func (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
93func (s *FileSystemForLocal) Close() error {

Callers

nothing calls this directly

Implementers 1

FileSystemForLocaldrive/driveimpl/local_impl.go

Calls 2

URLMethod · 0.80
SetChildrenMethod · 0.80

Tested by

no test coverage detected