MCPcopy
hub / github.com/dragonflyoss/dragonfly / Command

Method Command

test/e2e/util/exec.go:74–83  ·  view source on GitHub ↗
(arg ...string)

Source from the content-addressed store, hash-verified

72}
73
74func (p *PodExec) Command(arg ...string) *exec.Cmd {
75 extArgs := []string{"-n", p.namespace, "exec", p.name, "--"}
76 if p.container != "" {
77 extArgs = []string{"-n", p.namespace, "exec", "-c", p.container, p.name, "--"}
78 }
79
80 extArgs = append(extArgs, arg...)
81 fmt.Printf(`pod %s/%s exec: "%s"\n`, p.namespace, p.name, strings.Join(arg, `" "`))
82 return KubeCtlCommand(extArgs...)
83}
84
85func (p *PodExec) CurlCommand(method string, header map[string]string, data map[string]any, target string) *exec.Cmd {
86 extArgs := []string{"/usr/bin/curl", target, "-s"}

Callers 15

CurlCommandMethod · 0.95
TestPlugin_LoadFunction · 0.80
rate_limit_test.goFile · 0.80
e2e_test.goFile · 0.80
dfcache_test.goFile · 0.80
proxy_test.goFile · 0.80
dfget_test.goFile · 0.80
UploadArtifactStdoutFunction · 0.80
UploadArtifactPrevStdoutFunction · 0.80
DockerCommandFunction · 0.80
DockerCopyFunction · 0.80

Calls 2

KubeCtlCommandFunction · 0.85
PrintfMethod · 0.45

Tested by 2

TestPlugin_LoadFunction · 0.64
TestLoadPluginFunction · 0.64