MCPcopy
hub / github.com/abiosoft/colima / Running

Method Running

daemon/daemon.go:73–91  ·  view source on GitHub ↗
(ctx context.Context, conf config.Config)

Source from the content-addressed store, hash-verified

71}
72
73func (l processManager) Running(ctx context.Context, conf config.Config) (s Status, err error) {
74 err = l.host.RunQuiet(osutil.Executable(), "daemon", "status", config.CurrentProfile().ShortName)
75 if err != nil {
76 return
77 }
78 s.Running = true
79
80 ctx = context.WithValue(ctx, process.CtxKeyDaemon(), s.Running)
81
82 for _, p := range processesFromConfig(conf) {
83 pErr := p.Alive(ctx)
84 s.Processes = append(s.Processes, processStatus{
85 Name: p.Name(),
86 Running: pErr == nil,
87 Error: pErr,
88 })
89 }
90 return
91}
92
93func (l processManager) Start(ctx context.Context, conf config.Config) error {
94 _ = l.Stop(ctx, conf) // this is safe, nothing is done when not running

Callers 1

StopMethod · 0.95

Calls 7

ExecutableFunction · 0.92
CurrentProfileFunction · 0.92
CtxKeyDaemonFunction · 0.92
processesFromConfigFunction · 0.85
RunQuietMethod · 0.65
AliveMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected