Skip to content

Commit

Permalink
[gce_call_creds_default] Credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Oct 1, 2021
1 parent 98d919e commit 4b9b839
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions credentials/google/google.go
Expand Up @@ -35,8 +35,8 @@ const tokenRequestTimeout = 30 * time.Second

var logger = grpclog.Component("credentials")

// DefaultCredsOptions constructs options to build DefaultCreds.
type DefaultCredsOptions struct {
// DefaultCredentialsOptions constructs options to build DefaultCreds.
type DefaultCredentialsOptions struct {
// PerRPCCreds is a per RPC credentials that is passed to a bundle.
PerRPCCreds credentials.PerRPCCredentials
}
Expand All @@ -45,7 +45,7 @@ type DefaultCredsOptions struct {
// configured to work with google services.
//
// This API is experimental.
func NewDefaultCredentialsWithOptions(opts DefaultCredsOptions) credentials.Bundle {
func NewDefaultCredentialsWithOptions(opts DefaultCredentialsOptions) credentials.Bundle {
perRPC := opts.PerRPCCreds
if perRPC == nil {
ctx, cancel := context.WithTimeout(context.Background(), tokenRequestTimeout)
Expand Down Expand Up @@ -73,7 +73,7 @@ func NewDefaultCredentialsWithOptions(opts DefaultCredsOptions) credentials.Bund
//
// This API is experimental.
func NewDefaultCredentials() credentials.Bundle {
return NewDefaultCredentialsWithOptions(DefaultCredsOptions{})
return NewDefaultCredentialsWithOptions(DefaultCredentialsOptions{})
}

// NewComputeEngineCredentials returns a credentials bundle that is configured to work
Expand All @@ -82,7 +82,7 @@ func NewDefaultCredentials() credentials.Bundle {
//
// This API is experimental.
func NewComputeEngineCredentials() credentials.Bundle {
return NewDefaultCredentialsWithOptions(DefaultCredsOptions{
return NewDefaultCredentialsWithOptions(DefaultCredentialsOptions{
PerRPCCreds: oauth.NewComputeEngine(),
})
}
Expand Down

0 comments on commit 4b9b839

Please sign in to comment.