zone_selector

package
v0.0.0-...-d996d1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractGoogleApiZone

func ExtractGoogleApiZone(uri string) (string, error)

ExtractGoogleApiZone takes a Google API zone string and returns the zone.

func GetZoneSubnet

func GetZoneSubnet(ctx context.Context, zone string) (string, error)

GetZoneSubnet uses the selected zone to return the correct subnet.

GetZoneSubnet expects zone to be in the format `xxx-yyy-zzz`. `xxx-yyy` represents the region while `zzz` represents the subzone. For example, `us-central1-a` means the region is `us-central1` and the subzone is `a`.

func SelectZone

func SelectZone(ctx context.Context, r *api.LeaseVMRequest, seed int64) string

SelectZone selects a random zone based on the specified testing client.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL