MCPcopy Index your code
hub / github.com/celer-pkg/celer / mountNFSDir

Method mountNFSDir

pkgcache/cache_setup.go:379–391  ·  view source on GitHub ↗
(serverExport, mountPoint string)

Source from the content-addressed store, hash-verified

377}
378
379func (n *NFSClientSetup) mountNFSDir(serverExport, mountPoint string) error {
380 output, err := cmd.NewExecutor("", "mount", "-t", "nfs", serverExport, mountPoint).ExecuteOutput()
381 if err != nil {
382 output = strings.TrimSpace(output)
383 if output != "" {
384 return fmt.Errorf("failed to mount %q from %q -> %s -> %w", mountPoint, serverExport, output, err)
385 }
386 return fmt.Errorf("failed to mount %q from %q -> %w", mountPoint, serverExport, err)
387 }
388
389 color.PrintHint("✔ mount nfs dir %q on %q", serverExport, mountPoint)
390 return nil
391}
392
393// probeNFSServer checks the NFS server's reachability before the mount call.
394func (n *NFSClientSetup) probeNFSServer(serverExport string) error {

Callers 2

SetupMethod · 0.95

Calls 3

NewExecutorFunction · 0.92
PrintHintFunction · 0.92
ExecuteOutputMethod · 0.80