Probe inspects a source remote and optional target remote.
(ctx context.Context, req ProbeRequest)
| 29 | |
| 30 | // Probe inspects a source remote and optional target remote. |
| 31 | func (c *Client) Probe(ctx context.Context, req ProbeRequest) (ProbeResult, error) { |
| 32 | if err := req.Validate(); err != nil { |
| 33 | return ProbeResult{}, err |
| 34 | } |
| 35 | cfg, err := c.buildProbeConfig(ctx, req) |
| 36 | if err != nil { |
| 37 | return ProbeResult{}, err |
| 38 | } |
| 39 | result, err := internalbridge.Probe(ctx, cfg) |
| 40 | if err != nil { |
| 41 | return ProbeResult{}, fmt.Errorf("probe: %w", err) |
| 42 | } |
| 43 | return internalbridge.FromProbeResult(result), nil |
| 44 | } |
| 45 | |
| 46 | // Plan computes ref actions without pushing. |
| 47 | func (c *Client) Plan(ctx context.Context, req PlanRequest) (PlanResult, error) { |
no test coverage detected