Skip to content

metadata: support cancellation of GCE platform detection #11787

Open
@diurnalist

Description

@diurnalist

Is your feature request related to a problem? Please describe.

Currently the OnGCE call can block for an indeterminate amount of time, depending on the result of resolving the metadata IP address and/or its DNS record. This cannot be canceled via any mechanism by the caller presently, which prevents the caller from putting a ceiling on the call duration for a more reliable experience.

Describe the solution you'd like

Similar to other context-aware functions in the package, OnGCE should take a context.

Describe alternatives you've considered

There is no other way to prevent this situation currently, unless the caller executes this in an entirely different process.

Additional context

n/a

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions