cloudrun

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

cloudrun is Cloud Run 固有のmetadataを扱う https://cloud.google.com/run/docs/reference/container-contract#env-vars

Index

Constants

View Source
const ConfigurationKey = "K_CONFIGURATION"

ConfigurationKey is Cloud Run Configuration Env Key

View Source
const RevisionKey = "K_REVISION"

RevisionKey is Cloud Run Revision Env Key

View Source
const ServiceKey = "K_SERVICE"

ServiceKey is Cloud Run Service Env Key

Variables

This section is empty.

Functions

func Configuration

func Configuration() (string, error)

Service is return Cloud Run service revision id The name of the Cloud Run configuration that created the revision. Example gcpboxtest

func OnCloudRun

func OnCloudRun() bool

OnCloudRun is AppがCloud Runで動いてるかどうか 環境変数見てるだけなので、偽装可能

func OnCloudRunReal

func OnCloudRunReal() bool

OnCloudRunReal is AppがCloudRunで動いてるかどうか 環境変数およびOnGCP()も見てるので、本当にCloud Runで動いてるか

func Revision

func Revision() (string, error)

Service is return Cloud Run service revision id Example gcpboxtest-00009-xiz

func Service

func Service() (string, error)

Service is return Cloud Run service id Example gcpboxtest

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL