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

Function ProbeConfig

internalbridge/config.go:59–73  ·  view source on GitHub ↗
(source Endpoint, sourceAuth EndpointAuth, target *Endpoint, targetAuth EndpointAuth, protocol ProtocolMode, includeTags, allRefs, collectStats bool, excludeRefPrefixes []string, httpClient *http.Client)

Source from the content-addressed store, hash-verified

57}
58
59func ProbeConfig(source Endpoint, sourceAuth EndpointAuth, target *Endpoint, targetAuth EndpointAuth, protocol ProtocolMode, includeTags, allRefs, collectStats bool, excludeRefPrefixes []string, httpClient *http.Client) Config {
60 cfg := syncer.Config{
61 Source: ToSyncerEndpoint(source, sourceAuth),
62 HTTPClient: httpClient,
63 IncludeTags: includeTags,
64 AllRefs: allRefs,
65 ExcludeRefPrefixes: append([]string(nil), excludeRefPrefixes...),
66 ShowStats: collectStats,
67 ProtocolMode: protocolString(protocol),
68 }
69 if target != nil {
70 cfg.Target = ToSyncerEndpoint(*target, targetAuth)
71 }
72 return Config{raw: cfg}
73}
74
75func 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{

Callers 1

buildProbeConfigMethod · 0.92

Calls 2

ToSyncerEndpointFunction · 0.85
protocolStringFunction · 0.70

Tested by

no test coverage detected