cloudruntime

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cloudruntime provides primitives for loading data from the cloud runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configuration

func Configuration() (string, bool)

Configuration returns the service configuration of the current runtime.

func Port

func Port() (int, bool)

Port returns the service port of the current runtime.

func ProjectID

func ProjectID() (string, bool)

ProjectID returns the Google Cloud Project ID of the current runtime.

func Revision

func Revision() (string, bool)

Revision returns the service revision of the current runtime.

func Service

func Service() (string, bool)

Service returns the service name of the current runtime.

func ServiceAccount

func ServiceAccount() (string, bool)

ServiceAccount returns the default service account of the current runtime.

func ServiceVersion

func ServiceVersion() (string, bool)

ServiceVersion returns the service version of the current runtime. The service version is taken from, in order of precedence: - the "SERVICE_VERSION" environment variable - the go.einride.tech/cloudrunner/cloudruntime.serviceVersion variable (must be set at build-time) - the "K_REVISION" environment variable - no version

func ServiceVersionFromLinkerFlags

func ServiceVersionFromLinkerFlags() string

ServiceVersionFromLinkerFlags returns the exact value of the variable:

go.einride.tech/cloudrunner/cloudruntime.serviceVersion

This variable can be set during build-time to provide a default value for the service version.

Example:

go build -ldflags="-X 'go.einride.tech/cloudrunner/cloudruntime.serviceVersion=v1.0.0'"

Types

This section is empty.

Jump to

Keyboard shortcuts

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