File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 5
5
EnvKeyGoogleCloudProject = "GOOGLE_CLOUD_PROJECT" // for Google App Engine
6
6
EnvKeyGAEServiceName = "GAE_SERVICE" // for Google App Engine
7
7
EnvKeyGAEServiceVersion = "GAE_VERSION" // for Google App Engine
8
+ EnvKeyRUNServiceName = "K_SERVICE" // for Google Cloud Run
9
+ EnvKeyRUNServiceRevision = "K_REVISION" // for Google Cloud Run
8
10
)
Original file line number Diff line number Diff line change 11
11
GAEServiceName = os .Getenv (EnvKeyGAEServiceName )
12
12
// GAEServiceVersion - Google App Engine service version
13
13
GAEServiceVersion = os .Getenv (EnvKeyGAEServiceVersion )
14
+ // RUNServiceName - Google Cloud Run service name
15
+ RUNServiceName = os .Getenv (EnvKeyRUNServiceName )
16
+ // RUNServiceRevision - Google Cloud Run service revision
17
+ RUNServiceRevision = os .Getenv (EnvKeyRUNServiceRevision )
14
18
)
15
19
16
20
func getProjectID () string {
@@ -32,4 +36,6 @@ func Reload() {
32
36
ProjectID = getProjectID ()
33
37
GAEServiceName = os .Getenv (EnvKeyGAEServiceName )
34
38
GAEServiceVersion = os .Getenv (EnvKeyGAEServiceVersion )
39
+ RUNServiceName = os .Getenv (EnvKeyRUNServiceName )
40
+ RUNServiceRevision = os .Getenv (EnvKeyRUNServiceRevision )
35
41
}
You can’t perform that action at this time.
0 commit comments