HostDgraphBinaryPath returns the path to the host-OS-native dgraph binary in tempBinDir. On Linux this is the same binary used by Docker containers, named by buildvars.BinaryName.Get() (typically "dgraph"). On non-Linux (macOS) it is a separate native binary staged as hostBinaryFileName by setupBina
()
| 43 | // hostBinaryFileName by setupBinary(). The HostBinaryName hook lets a |
| 44 | // fork override the filename entirely. |
| 45 | func (c *LocalCluster) HostDgraphBinaryPath() string { |
| 46 | if name := HostBinaryName(); name != "" { |
| 47 | return filepath.Join(c.tempBinDir, name) |
| 48 | } |
| 49 | if runtime.GOOS == "linux" { |
| 50 | return filepath.Join(c.tempBinDir, buildvars.BinaryName.Get()) |
| 51 | } |
| 52 | return filepath.Join(c.tempBinDir, hostBinaryFileName) |
| 53 | } |
| 54 | |
| 55 | var datafiles = map[string]string{ |
| 56 | "1million.schema": "https://github.com/dgraph-io/dgraph-benchmarks/blob/main/data/1million.schema?raw=true", |