Documentation ¶
Overview ¶
Description: This file contains the read through cache implementation for this package.
Description: This code contains cloud interface specific code
Description: This file contains the custom cloud code
Package region implements cloud region specific functionality Namely it implements a way to determine the "nearest" region to the current client.
Description: This file contains the GCP cloud code.
Package region Implements region specific helpers
Index ¶
Constants ¶
const ( // CloudGCP is the Google Cloud CloudGCP CloudName = "gcp" // RegionGCPUS is a multi-region region for all of the US RegionGCPUS Name = "us" // RegionGCPUS is a multi-region region for all of Europe RegionGCPEurope Name = "europe" // RegionGCPUS is a multi-region region for all of Asia RegionGCPAsia Name = "asia" )
Variables ¶
var ( // RegionCachePath is the $HOME/<RegionCachePath> location of the regionpicker cache RegionCachePath = filepath.Join(".outreach", ".cache", "box") // RegionCacheFile is the name of the regionpicker cache file RegionCacheFile = "regions.json" )
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
Cloud is an interface that returns regions exposed by a cloud
func CloudFromCloudName ¶
CloudFromCloudName returns a cloud from a provided cloud name
type CloudName ¶
type CloudName string
CloudName is a cloud that's able to be discovered
const ( // CloudCustom is a custom cloud created by NewCustomCloud CloudCustom CloudName = "custom" )
type CustomCloud ¶
type CustomCloud struct {
// contains filtered or unexported fields
}
CustomCloud is a cloud that can take arbitrary regions
func NewCustomCloud ¶
func NewCustomCloud(regions []*CustomRegion) *CustomCloud
NewCustomCloud creates a new CustomCloud with the provided regions
type CustomRegion ¶
type CustomRegion struct { // Name is a region name Name Name // Endpoint is an endpoint to HEAD to determine the latency of this region Endpoint string }
CustomRegion is a region that can be passed to NewCustomCloud to create a custom cloud with specific options.