diff --git a/xds/bootstrap/bootstrap.go b/xds/bootstrap/bootstrap.go index 87814da58ce..db6c7d6754a 100644 --- a/xds/bootstrap/bootstrap.go +++ b/xds/bootstrap/bootstrap.go @@ -37,7 +37,7 @@ var registry = make(map[string]Credentials) // Credentials interface encapsulates a credentials.Bundle builder // that can be used for communicating with the xDS Management server. type Credentials interface { - // Build returns a credential bundle associated with the Builder. + // Build returns a credential bundle associated with this credential. Build(config json.RawMessage) (credentials.Bundle, error) // Name returns the credential name associated with this credential. Name() string diff --git a/xds/internal/xdsclient/bootstrap/bootstrap.go b/xds/internal/xdsclient/bootstrap/bootstrap.go index 1dc7572a641..6e461c01343 100644 --- a/xds/internal/xdsclient/bootstrap/bootstrap.go +++ b/xds/internal/xdsclient/bootstrap/bootstrap.go @@ -69,13 +69,9 @@ var bootstrapFileReadFunc = ioutil.ReadFile // JSON config. type insecureCredsBuilder struct{} -// Build returns a default insecure credential bundle. Currently the JSON -// config is unused. func (i *insecureCredsBuilder) Build(_ json.RawMessage) (credentials.Bundle, error) { return insecure.NewBundle(), nil } - -// Name returns the name associated with CredsBuilder i.e. "insecure". func (i *insecureCredsBuilder) Name() string { return "insecure" } @@ -84,13 +80,10 @@ func (i *insecureCredsBuilder) Name() string { // JSON config. type googleDefaultCredsBuilder struct{} -// Build returns a default google credential bundle. Currently the JSON -// config is unused. func (d *googleDefaultCredsBuilder) Build(_ json.RawMessage) (credentials.Bundle, error) { return google.NewDefaultCredentials(), nil } -// Name returns the name associated with googleDefaultCredsBuilder i.e. "google_default". func (d *googleDefaultCredsBuilder) Name() string { return "google_default" }