Documentation ¶
Index ¶
- Constants
- func ExtractionRegion(metaZone string) (string, error)
- func ExtractionZone(metaZone string) (string, error)
- func GetAppEngineDeploymentID() (string, error)
- func GetAppEngineEnv() (string, error)
- func GetAppEngineInstance() (string, error)
- func GetAppEngineMemoryMB() (string, error)
- func GetAppEngineRuntime() (string, error)
- func GetAppEngineService() (string, error)
- func GetAppEngineVersion() (string, error)
- func GetInstanceAttribute(key string) (string, error)
- func GetProjectAttribute(key string) (string, error)
- func GetProjectID() (string, error)
- func GetRegion() (string, error)
- func GetServiceAccountEmail() (string, error)
- func GetZone() (string, error)
- func Is(err error, code ErrCode) bool
- func OnGCP() bool
- type ErrCode
- type Error
Constants ¶
const AppEngineDeploymentID = "GAE_DEPLOYMENT_ID"
const AppEngineEnv = "GAE_ENV"
const AppEngineInstance = "GAE_INSTANCE"
const AppEngineMemoryMB = "GAE_MEMORY_MB"
const AppEngineRuntime = "GAE_RUNTIME"
const AppEngineService = "GAE_SERVICE"
const AppEngineVersion = "GAE_VERSION"
Variables ¶
This section is empty.
Functions ¶
func ExtractionRegion ¶
ExtractionRegion is Metadata Serverから取得する projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] 形式の文字列から、Region部分を取り出す
func ExtractionZone ¶
ExtractionZone is Metadata Serverから取得する projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] 形式の文字列から、Zone部分を取り出す
func GetAppEngineDeploymentID ¶
GetAppEngineDeploymentID is return deployment id The ID of the current deployment. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineEnv ¶
GetAppEngineEnv is return env The App Engine environment. Set to standard. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineInstance ¶
GetAppEngineInstance is return version id The ID of the instance on which your service is currently running. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineMemoryMB ¶
GetAppEngineMemoryMB is return MemoryMB The amount of memory available to the application process, in MB. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineRuntime ¶
GetAppEngineRuntime is return runtime The runtime specified in your app.yaml file. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineService ¶
GetAppEngineService is return service id The service name specified in your app.yaml file. If no service name is specified, it is set to default. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetAppEngineVersion ¶
GetAppEngineVersion is return version id The current version label of your service. https://cloud.google.com/appengine/docs/standard/go/runtime#environment_variables
func GetInstanceAttribute ¶
GetInstanceAttribute is Instance Metadataを取得する GCP以外で動いている時は、環境変数を取得する
func GetProjectAttribute ¶
GetProjectAttribute is Project Metadataを取得する GCP以外で動いている時は、環境変数を取得する
func GetProjectID ¶
GetProjectID is Return current GCP ProjectID GCP上で動いている場合は、Project Metadataから取得し、そうでなければ、環境変数から取得する
func GetServiceAccountEmail ¶
GetServiceAccountEmail is Return current Service Account Email GCP上で動いている場合は、Metadataから取得し、そうでなければ、環境変数から取得する