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

Method SyncReady

agent/agentsocket/client.go:99–107  ·  view source on GitHub ↗

SyncReady requests whether a unit is ready to be started. That is, all dependencies are satisfied.

(ctx context.Context, unitName unit.ID)

Source from the content-addressed store, hash-verified

97
98// SyncReady requests whether a unit is ready to be started. That is, all dependencies are satisfied.
99func (c *Client) SyncReady(ctx context.Context, unitName unit.ID) (bool, error) {
100 resp, err := c.client.SyncReady(ctx, &proto.SyncReadyRequest{
101 Unit: string(unitName),
102 })
103 if err != nil {
104 return false, xerrors.Errorf("sync ready: %w", err)
105 }
106 return resp.Ready, nil
107}
108
109// SyncStatus gets the status of a unit and its dependencies.
110func (c *Client) SyncStatus(ctx context.Context, unitName unit.ID) (SyncStatusResponse, error) {

Callers 1

syncStartMethod · 0.95

Calls 2

SyncReadyMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected