sgcloudrun

package
v0.371.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUpLocalDevelop added in v0.318.0

func CleanUpLocalDevelop(environ []string) error

CleanUpLocalDevelop is meant to be called after the Cloud Run service is shut down locally. It removes the temporary creds-xxxxx.json file.

func Develop

func Develop(ctx context.Context, path, keyFile, configFile string) error

Develop starts the Cloud Run service at the provided Go path with the provided service account and config. Deprecated: Develop uses a service account key which are inherently more risky as they are not often rotated. Use LocalDevelop instead.

func DevelopCommand added in v0.140.0

func DevelopCommand(ctx context.Context, path, keyFile, configFile string) (*exec.Cmd, error)

DevelopCommand returns an *exec.Cmd pre-configured to start the Cloud Run service at the provided Go path with the provided service account and config. Deprecated: DevelopCommand uses a service account key which are inherently more risky as they are not often rotated. Use LocalDevelopCommand instead.

func LocalDevelop added in v0.291.0

func LocalDevelop(ctx context.Context, path, configFile, projectID, serviceAccountEmail string) error

func LocalDevelopCommand added in v0.291.0

func LocalDevelopCommand(
	ctx context.Context,
	path string,
	configFile string,
	projectID string,
	serviceAccountEmail string,
) (*exec.Cmd, error)

func LocalDevelopEnv added in v0.318.0

func LocalDevelopEnv(
	ctx context.Context,
	configFile string,
	projectID string,
	serviceAccountEmail string,
) ([]string, error)

LocalDevelopEnv sets up the environment variables for running the Cloud Run service locally, with SA impersonation. The environment variables are returned on the format KEY=value and can easily be outputted to a .env file or similar. NOTE: this function creates a temporary creds-xxxxx.json file that is meant to be removed when the service is shut down. Make sure to call CleanUpLocalDevelop after shutting down the service.

Types

This section is empty.

Jump to

Keyboard shortcuts

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