MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / allocateSyncGroupID

Function allocateSyncGroupID

cli/internal/platform/inject.go:493–498  ·  view source on GitHub ↗

YYYYMMDDhhmmssfff — same shape platform/syncs-transformer uses, so external-sync rows share the keyspace.

(now time.Time)

Source from the content-addressed store, hash-verified

491// YYYYMMDDhhmmssfff — same shape platform/syncs-transformer uses, so
492// external-sync rows share the keyspace.
493func allocateSyncGroupID(now time.Time) uint64 {
494 t := now.UTC()
495 base := t.Format("20060102150405") + fmt.Sprintf("%03d", t.Nanosecond()/1e6)
496 u, _ := strconv.ParseUint(base, 10, 64)
497 return u
498}
499
500func activeTenants(ctx context.Context, cl *cloudquery_api.ClientWithResponses, teamName string) ([]cloudquery_api.PlatformTenantSummary, error) {
501 ctx, cancel := context.WithTimeout(ctx, requestTimeout)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected