MCPcopy Index your code
hub / github.com/coder/coder / UpdateLifecycle

Method UpdateLifecycle

agent/agenttest/client.go:343–351  ·  view source on GitHub ↗
(_ context.Context, req *agentproto.UpdateLifecycleRequest)

Source from the content-addressed store, hash-verified

341}
342
343func (f *FakeAgentAPI) UpdateLifecycle(_ context.Context, req *agentproto.UpdateLifecycleRequest) (*agentproto.Lifecycle, error) {
344 f.Lock()
345 defer f.Unlock()
346 s, err := agentsdk.LifecycleStateFromProto(req.GetLifecycle().GetState())
347 if assert.NoError(f.t, err) {
348 f.lifecycleStates = append(f.lifecycleStates, s)
349 }
350 return req.GetLifecycle(), nil
351}
352
353func (f *FakeAgentAPI) BatchUpdateAppHealths(ctx context.Context, req *agentproto.BatchUpdateAppHealthRequest) (*agentproto.BatchUpdateAppHealthResponse, error) {
354 f.logger.Debug(ctx, "batch update app health", slog.F("req", req))

Callers

nothing calls this directly

Calls 5

LifecycleStateFromProtoFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45
GetStateMethod · 0.45
GetLifecycleMethod · 0.45

Tested by

no test coverage detected