Documentation ¶
Index ¶
- func GetServiceAccountName(ctx context.Context) (string, error)
- func SendErrorReport(ctx context.Context, err error)
- func SetupErrorReporting(ctx context.Context) (context.Context, error)
- func SetupTestingContext(ctx context.Context, cfg *config.Config, serviceAccount, host string, ...) (context.Context, *gerritpb.MockGerritClient, *tqtesting.Scheduler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceAccountName ¶
GetServiceAccountName returns the app's service account name.
func SendErrorReport ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.