Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: logdog/client/butlerlib/bootstrap/bootstrap.go

Issue 2456673003: Butler: export Coordinator host in environment. (Closed)
Patch Set: Relieve suspense. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/client/butler/bootstrap/env.go ('k') | logdog/client/butlerlib/bootstrap/bootstrap_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/butlerlib/bootstrap/bootstrap.go
diff --git a/logdog/client/butlerlib/bootstrap/bootstrap.go b/logdog/client/butlerlib/bootstrap/bootstrap.go
index 7264f63ca4fd65de3ddda508641a3ad0c2294f05..34ee46e1942f4ecee15422112a14ffb087b95c8d 100644
--- a/logdog/client/butlerlib/bootstrap/bootstrap.go
+++ b/logdog/client/butlerlib/bootstrap/bootstrap.go
@@ -18,8 +18,19 @@ import (
// bootstrapped.
var ErrNotBootstrapped = errors.New("not bootstrapped")
-// Bootstrap contains information about the
+// Bootstrap contains information about the configured bootstrap environment.
+//
+// The bootstrap environment is loaded by probing the local application
+// environment for variables emitted by a bootstrapping Butler.
type Bootstrap struct {
+ // CoordinatorHost is the name of the upstream Coordinator host.
+ //
+ // This is just the host name ("example.appspot.com"), not a full URL.
+ //
+ // If this instance is not configured using a production Coordinator Output,
+ // this will be empty.
+ CoordinatorHost string
+
// Project is the Butler instance project name.
Project config.ProjectName
// Prefix is the Butler instance prefix.
@@ -38,8 +49,9 @@ func getFromEnv(env environ.Environment, reg *streamclient.Registry) (*Bootstrap
}
bs := &Bootstrap{
- Prefix: types.StreamName(prefix),
- Project: config.ProjectName(env[EnvStreamProject]),
+ CoordinatorHost: env[EnvCoordinatorHost],
+ Prefix: types.StreamName(prefix),
+ Project: config.ProjectName(env[EnvStreamProject]),
}
if err := bs.Prefix.Validate(); err != nil {
return nil, fmt.Errorf("bootstrap: failed to validate prefix %q: %s", prefix, err)
« no previous file with comments | « logdog/client/butler/bootstrap/env.go ('k') | logdog/client/butlerlib/bootstrap/bootstrap_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698