env

package
v1.88.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAzureFunction added in v1.88.0

func IsAzureFunction() bool

IsAzureFunction detects if we are running inside an Azure Function app.

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 version of the application from the environment-dependent variables or the hostname if none is available.

func Version

func Version() string

Version returns the application version. In supported environment it may extract the info from files or environment variables. Otherwise it will use the env variable VERSION that should be set manually to the desired value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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