env

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCloudRun added in v1.69.0

func IsCloudRun() bool

IsCloudRun detects if we are running inside a Cloud Run app.

func IsJenkins added in v1.63.0

func IsJenkins() bool

IsJenkins detects if we are running as a step of a Jenkins build.

func IsLocal

func IsLocal() bool

IsLocal returns true if we are running inside a local debug environment instead of a production Kubernetes container. It dependes on Version() working correctly.

func ServiceName added in v1.68.0

func ServiceName() string

ServiceName returns the K_SERVICE environment variable or the hostname if not available as it is common during development.

func Version

func Version() string

Version returns the environment variable K_REVISION or VERSION. In development it should be empty. In production it should be set accordingly; it may be for example the container hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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