refactor(bigtable): 1x heartbeat + drop `active := 1` code smell

Two follow-ups after the java-bigtable heartbeat cross-check:

1) handleSessionParameters: drop 3x multiplier on nextHeartbeatDeadline
   (already done in resetHeartbeatDeadline in the prior PR-2 commit).
   Now 1 * interval, matching Java's SessionImpl.java:440 which sets
   nextHeartbeat = now + heartbeatInterval on every reset. Wake-comment
   updated to reflect the new arithmetic.

2) heartBeatLoop:
   - Delete the `active := 1 // multiplex=1; kept as %d so a future >1
     stays greppable` code smell. Inline `1` was documenting itself;
     the variable existed only for its comment. Drop it — when
     multiplex > 1 lands, the caller will read `s.activeVRPCCount()`
     (or similar), not this stale scaffolding.
   - `lastFrameAge = interval - remaining` (was `3*interval - remaining`)
     to reflect the new 1x deadline.
   - Debugf/recordEvent format strings drop the `in_flight=%d` field
     that was carrying the constant `1`.

Test adjustments:
- TestHandleSessionParameters_UpdatesIntervalAndDeadline: expect
  deadline ~= before+interval (1x) instead of before+3*interval.
- TestHeartBeatLoop_HeartbeatsKeepInflightVRPCAlive: seed deadline
  at now+30ms (1x) instead of now+90ms (was 3x).
2 files changed
tree: f6c07d37346cd7e04934da6eba6fdbb4fcb7b9a9
  1. .gemini/
  2. .github/
  3. .librarian/
  4. accessapproval/
  5. accesscontextmanager/
  6. advisorynotifications/
  7. agentidentity/
  8. agentplatform/
  9. agentregistry/
  10. ai/
  11. aiplatform/
  12. alloydb/
  13. analytics/
  14. apigateway/
  15. apigeeconnect/
  16. apigeeregistry/
  17. apihub/
  18. apikeys/
  19. apiregistry/
  20. appengine/
  21. apphub/
  22. appoptimize/
  23. apps/
  24. area120/
  25. artifactregistry/
  26. asset/
  27. assuredworkloads/
  28. auditmanager/
  29. auth/
  30. automl/
  31. backstory/
  32. backupdr/
  33. baremetalsolution/
  34. batch/
  35. beyondcorp/
  36. biglake/
  37. bigquery/
  38. bigtable/
  39. billing/
  40. binaryauthorization/
  41. capacityplanner/
  42. certificatemanager/
  43. ces/
  44. channel/
  45. chat/
  46. chronicle/
  47. civil/
  48. cloudbuild/
  49. cloudcontrolspartner/
  50. clouddms/
  51. cloudprofiler/
  52. cloudquotas/
  53. cloudsecuritycompliance/
  54. cloudtasks/
  55. commerce/
  56. commerceproducer/
  57. compute/
  58. confidentialcomputing/
  59. config/
  60. configdelivery/
  61. contactcenterinsights/
  62. container/
  63. containeranalysis/
  64. datacatalog/
  65. dataflow/
  66. dataform/
  67. datafusion/
  68. datalabeling/
  69. datamanager/
  70. dataplex/
  71. dataproc/
  72. dataqna/
  73. datastore/
  74. datastream/
  75. deploy/
  76. developerconnect/
  77. devicestreaming/
  78. dialogflow/
  79. discoveryengine/
  80. dlp/
  81. documentai/
  82. domains/
  83. edgecontainer/
  84. edgenetwork/
  85. errorreporting/
  86. essentialcontacts/
  87. eventarc/
  88. filestore/
  89. financialservices/
  90. firestore/
  91. functions/
  92. geminidataanalytics/
  93. gkebackup/
  94. gkeconnect/
  95. gkehub/
  96. gkemulticloud/
  97. gkerecommender/
  98. grafeas/
  99. gsuiteaddons/
  100. httpreplay/
  101. hypercomputecluster/
  102. iam/
  103. iap/
  104. identitytoolkit/
  105. ids/
  106. internal/
  107. iot/
  108. kms/
  109. language/
  110. licensemanager/
  111. lifesciences/
  112. locationfinder/
  113. logging/
  114. longrunning/
  115. lustre/
  116. maintenance/
  117. managedidentities/
  118. managedkafka/
  119. maps/
  120. mediatranslation/
  121. memcache/
  122. memorystore/
  123. metastore/
  124. migrationcenter/
  125. modelarmor/
  126. monitoring/
  127. netapp/
  128. networkconnectivity/
  129. networkmanagement/
  130. networksecurity/
  131. networkservices/
  132. notebooks/
  133. optimization/
  134. oracledatabase/
  135. orchestration/
  136. orgpolicy/
  137. osconfig/
  138. oslogin/
  139. parallelstore/
  140. parametermanager/
  141. phishingprotection/
  142. policysimulator/
  143. policytroubleshooter/
  144. privatecatalog/
  145. privilegedaccessmanager/
  146. productregistry/
  147. profiler/
  148. pubsub/
  149. pubsublite/
  150. rapidmigrationassessment/
  151. recaptchaenterprise/
  152. recommendationengine/
  153. recommender/
  154. redis/
  155. resourcemanager/
  156. retail/
  157. rpcreplay/
  158. run/
  159. saasplatform/
  160. scheduler/
  161. secretmanager/
  162. securesourcemanager/
  163. security/
  164. securitycenter/
  165. securitycentermanagement/
  166. securityposture/
  167. servicecontrol/
  168. servicedirectory/
  169. servicehealth/
  170. servicemanagement/
  171. serviceusage/
  172. shell/
  173. shopping/
  174. spanner/
  175. speech/
  176. sql/
  177. storage/
  178. storagebatchoperations/
  179. storageinsights/
  180. storagetransfer/
  181. streetview/
  182. support/
  183. talent/
  184. telcoautomation/
  185. texttospeech/
  186. third_party/
  187. tpu/
  188. trace/
  189. translate/
  190. vectorsearch/
  191. vertexai/
  192. video/
  193. videointelligence/
  194. vision/
  195. visionai/
  196. vmmigration/
  197. vmwareengine/
  198. vpcaccess/
  199. webrisk/
  200. websecurityscanner/
  201. workflows/
  202. workloadmanager/
  203. workstations/
  204. .gitignore
  205. .release-please-bulk-manifest.json
  206. .release-please-individual-manifest.json
  207. CHANGES.md
  208. CODE_OF_CONDUCT.md
  209. CONTRIBUTING.md
  210. debug.md
  211. doc.go
  212. go.mod
  213. go.sum
  214. librarian.yaml
  215. LICENSE
  216. migration.md
  217. README.md
  218. release-please-bulk-config.json
  219. release-please-individual-config.json
  220. RELEASING.md
  221. SECURITY.md
  222. testing.md
README.md

Google Cloud Client Libraries for Go

Go Reference

Go packages for Google Cloud Platform services.

Installation

go get cloud.google.com/go/firestore@latest # Replace firestore with the package you want to use.

NOTE: Some of these packages are under development, and may occasionally make backwards-incompatible changes.

Supported APIs

For an updated list of all of our released APIs please see our reference docs.

Go Versions Supported

Our libraries are compatible with the two most recent major Go releases, the same policy the Go programming language follows. This means the currently supported versions are:

  • Go 1.25
  • Go 1.26

Authentication

By default, each client library will use Application Default Credentials (ADC) to automatically configure the credentials used in calling the API endpoint. When using the libraries in a Google Cloud Platform environment such as Compute Engine, Kubernetes Engine, or App Engine, no additional authentication steps are necessary. See Authentication methods at Google and Authenticate for using client libraries for more information.

client, err := storage.NewClient(ctx)

For applications running elsewhere, such as your local development environment, you can use the gcloud auth application-default login command from the Google Cloud CLI to set user credentials in your local filesystem. Application Default Credentials will automatically detect these credentials. See Set up ADC for a local development environment for more information.

Alternately, you may need to provide an explicit path to your credentials. To authenticate using a service account key file, either set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path to your key file, or programmatically pass option.WithCredentialsFile to the NewClient function of the desired package. For example:

client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))

You can exert even more control over authentication by using the credentials package to create an auth.Credentials. Then pass option.WithAuthCredentials to the NewClient function:

creds, err := credentials.DetectDefault(&credentials.DetectOptions{...})
...
client, err := storage.NewClient(ctx, option.WithAuthCredentials(creds))

Contributing

Contributions are welcome. Please, see the CONTRIBUTING document for details.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.

Links