NewComputeEngine constructs the PerRPCCredentials that fetches access tokens from Google Compute Engine (GCE)'s metadata server. It is only valid to use this if your program is running on a GCE instance. TODO(dsymonds): Deprecate and remove this.
()
| 146 | // if your program is running on a GCE instance. |
| 147 | // TODO(dsymonds): Deprecate and remove this. |
| 148 | func NewComputeEngine() credentials.PerRPCCredentials { |
| 149 | return TokenSource{google.ComputeTokenSource("")} |
| 150 | } |
| 151 | |
| 152 | // serviceAccount represents PerRPCCredentials via JWT signing key. |
| 153 | type serviceAccount struct { |
no outgoing calls
no test coverage detected