SyncReady requests whether a unit is ready to be started. That is, all dependencies are satisfied.
(ctx context.Context, unitName unit.ID)
| 97 | |
| 98 | // SyncReady requests whether a unit is ready to be started. That is, all dependencies are satisfied. |
| 99 | func (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. |
| 110 | func (c *Client) SyncStatus(ctx context.Context, unitName unit.ID) (SyncStatusResponse, error) { |