refactor(bigtable): address igor nits on Session debug surface

Six nits from the igor-reviewer-agent review of PR #20211:

- Introduce typed const SessionEventKind (close/hb-missed/hb-alive/
  ctx-done/retry) so writers landing in the follow-up vRPC and lifecycle
  PRs can't drift on the string literal.
- Replace the O(N) copy-shift in recordEvent with a wrap-index scheme
  matching latencySamples' existing pattern (eventsNext cursor).
- peerInfoSummary: %x → %d for AfeID and gfe — the rest of the pkg
  renders these as decimal.
- setChannelIndex: unexport (writer is package-internal) and take
  int32 directly instead of silently narrowing from int.
- sessionDebug.init: take *sessionTracer instead of SessionType so the
  redundancy with Session.sessionType goes away. NewSession threads
  newSessionTracer(sessionType) through at the call site.
- Add a doc comment on the sessionDebug struct pointing at the follow-up
  PRs where the counter / close-reason / remote-addr writers land.
2 files changed
tree: 50a36ed7abdd9cfb92c5a9bb99bf1ce62be6396c
  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