Skip to content

Commit

Permalink
Remove extra comments and fix one comment to use credential instead o…
Browse files Browse the repository at this point in the history
…f builder
  • Loading branch information
anicr7 committed Feb 1, 2022
1 parent 711c075 commit 256872a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion xds/bootstrap/bootstrap.go
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions xds/internal/xdsclient/bootstrap/bootstrap.go
Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand Down

0 comments on commit 256872a

Please sign in to comment.