MCPcopy Create free account
hub / github.com/entireio/git-sync / Validate

Method Validate

unstable/client.go:67–75  ·  view source on GitHub ↗

Validate rejects unknown values up front so callers don't have to wait for the deep bootstrap planning path to surface them. It runs on every request method regardless of whether the value will end up being consulted, since silently accepting a typo on a non-bootstrap path is worse than failing fast

()

Source from the content-addressed store, hash-verified

65// up being consulted, since silently accepting a typo on a
66// non-bootstrap path is worse than failing fast.
67func (o AdvancedOptions) Validate() error {
68 switch o.BootstrapStrategy {
69 case "", BootstrapStrategyFirstParent, BootstrapStrategyTopo:
70 return nil
71 default:
72 return fmt.Errorf("unsupported bootstrap strategy %q (want %q or %q)",
73 o.BootstrapStrategy, BootstrapStrategyFirstParent, BootstrapStrategyTopo)
74 }
75}
76
77type ProbeRequest struct {
78 Source gitsync.Endpoint

Callers 7

ProbeMethod · 0.45
PlanMethod · 0.45
SyncMethod · 0.45
ReplicateMethod · 0.45
BootstrapMethod · 0.45
FetchMethod · 0.45

Calls

no outgoing calls

Tested by 1