util

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServiceAccountName

func GetServiceAccountName(ctx context.Context) (string, error)

GetServiceAccountName returns the app's service account name.

func SendErrorReport

func SendErrorReport(ctx context.Context, err error)

SendErrorReport sends an error to ErrorReporting. Swallows the error when there's no ErrorReporting client because we don't want it to stop the app from running.

func SetupErrorReporting

func SetupErrorReporting(ctx context.Context) (context.Context, error)

SetupErrorReporting sets up an ErrorReporting client in the context.

func SetupTestingContext

func SetupTestingContext(ctx context.Context, cfg *config.Config, serviceAccount, host string, t *testing.T) (context.Context, *gerritpb.MockGerritClient, *tqtesting.Scheduler)

SetupTestingContext contains all the context setup things needed for testing. It returns the context, a MockGerritClient and a

Types

This section is empty.

Jump to

Keyboard shortcuts

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