resolveDataStore validates and normalizes the data-store request into the stored intent. Nil or "s3bucket" provisions a fresh per-org bucket; "external" reuses an existing bucket and requires a bucket name.
(req *provisionDataStoreReq)
| 185 | func RegisterDiscoveryAPI(r *gin.RouterGroup, store Store) { |
| 186 | h := &handler{store: store} |
| 187 | r.GET("/warehouses", h.listWarehouses) |
| 188 | r.GET("/warehouse-team-ids", h.listWarehouseTeamIDs) |
| 189 | } |
| 190 | |
| 191 | type handler struct { |
| 192 | store Store |
| 193 | trinoAdmission func(string) error |
| 194 | trinoDefaultCell string |
| 195 | trinoBackendValidator func(configstore.TrinoBackend) error |
| 196 | trinoServiceCredentialConnect func(string, string) *TrinoServiceCredentialConnect |
| 197 | // bucketSuffix is the env suffix (e.g. "mw-prod-us") used to compute the |
| 198 | // CP-owned s3bucket name; empty disables CP naming. See |
| 199 | // configstore.DucklingBucketName. |
| 200 | bucketSuffix string |
| 201 | // peerFanout may be nil (single-CP / tests). When set, the |
| 202 | // service-credentials mint uses it to fan a snapshot reload out to peer |
| 203 | // replicas after rotating a credential. |
| 204 | peerFanout PeerFanout |
| 205 | // ingressSuffix is the managed tenant DNS suffix (leading dot) joined onto |