mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
- Run the Weave integrations regardless of if weave is detected. - Make everything backoff and not spam the logs. - Add miekg dns to vendor. - Have the app periodically register with weaveDNS, and the probe do lookups there. - Decide what the local networks are at runtime, not once at startup. - Correctly resolve app ids, fixes #825
31 lines
488 B
Go
31 lines
488 B
Go
package exec
|
|
|
|
import (
|
|
"io"
|
|
"os/exec"
|
|
)
|
|
|
|
// Cmd is a hook for mocking
|
|
type Cmd interface {
|
|
StdoutPipe() (io.ReadCloser, error)
|
|
StderrPipe() (io.ReadCloser, error)
|
|
Start() error
|
|
Wait() error
|
|
Kill() error
|
|
Output() ([]byte, error)
|
|
Run() error
|
|
}
|
|
|
|
// Command is a hook for mocking
|
|
var Command = func(name string, args ...string) Cmd {
|
|
return &realCmd{exec.Command(name, args...)}
|
|
}
|
|
|
|
type realCmd struct {
|
|
*exec.Cmd
|
|
}
|
|
|
|
func (c *realCmd) Kill() error {
|
|
return c.Cmd.Process.Kill()
|
|
}
|