We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e6c9c9 commit 2e77959Copy full SHA for 2e77959
utils/cloudinfo/gce/gce.go
@@ -15,6 +15,7 @@
15
package gce
16
17
import (
18
+ "context"
19
"os"
20
"strings"
21
@@ -48,7 +49,7 @@ func (provider) IsActiveProvider() bool {
48
49
}
50
51
func (provider) GetInstanceType() info.InstanceType {
- machineType, err := metadata.Get("instance/machine-type")
52
+ machineType, err := metadata.GetWithContext(context.TODO(),"instance/machine-type")
53
if err != nil {
54
return info.UnknownInstance
55
@@ -58,7 +59,7 @@ func (provider) GetInstanceType() info.InstanceType {
58
59
60
61
func (provider) GetInstanceID() info.InstanceID {
- instanceID, err := metadata.Get("instance/id")
62
+ instanceID, err := metadata.GetWithContext(context.TODO(), "instance/id")
63
64
65
0 commit comments