(source Endpoint, sourceAuth EndpointAuth, target Endpoint, targetAuth EndpointAuth, scope RefScope, policy SyncPolicy, collectStats, dryRun bool, httpClient *http.Client)
| 73 | } |
| 74 | |
| 75 | func SyncConfig(source Endpoint, sourceAuth EndpointAuth, target Endpoint, targetAuth EndpointAuth, scope RefScope, policy SyncPolicy, collectStats, dryRun bool, httpClient *http.Client) Config { |
| 76 | return Config{raw: syncer.Config{ |
| 77 | Source: ToSyncerEndpoint(source, sourceAuth), |
| 78 | Target: ToSyncerEndpoint(target, targetAuth), |
| 79 | HTTPClient: httpClient, |
| 80 | Branches: append([]string(nil), scope.Branches...), |
| 81 | Mappings: ToValidationMappings(scope.Mappings), |
| 82 | AllRefs: scope.AllRefs, |
| 83 | ExcludeRefPrefixes: append([]string(nil), scope.ExcludeRefPrefixes...), |
| 84 | IncludeTags: policy.IncludeTags, |
| 85 | DryRun: dryRun, |
| 86 | ShowStats: collectStats, |
| 87 | Mode: operationModeString(policy.Mode), |
| 88 | ForceWithLease: policy.ForceWithLease, |
| 89 | ForceBlind: policy.ForceBlind, |
| 90 | Prune: policy.Prune, |
| 91 | BestEffort: policy.BestEffort, |
| 92 | ProtocolMode: protocolString(policy.Protocol), |
| 93 | MaterializedMaxObjects: syncer.DefaultMaterializedMaxObjects, |
| 94 | }} |
| 95 | } |
| 96 | |
| 97 | func Probe(ctx context.Context, cfg Config) (syncer.ProbeResult, error) { |
| 98 | result, err := syncer.Probe(ctx, cfg.raw) |
no test coverage detected