MCPcopy
hub / github.com/dgraph-io/dgraph / HostDgraphBinaryPath

Method HostDgraphBinaryPath

dgraphtest/load.go:45–53  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

43// hostBinaryFileName by setupBinary(). The HostBinaryName hook lets a
44// fork override the filename entirely.
45func (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
55var datafiles = map[string]string{
56 "1million.schema": "https://github.com/dgraph-io/dgraph-benchmarks/blob/main/data/1million.schema?raw=true",

Callers 3

TestCheckUpgradeFunction · 0.95
LiveLoadMethod · 0.95
BulkLoadMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by 1

TestCheckUpgradeFunction · 0.76