gps

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsLocation

type AwsLocation struct{}

AwsLocation A location for AWS environment.

func (*AwsLocation) Locality

func (a *AwsLocation) Locality() (string, error)

Locality Returns the locality for AWS environment. //TODO: Implement

func (*AwsLocation) LocalityType

func (a *AwsLocation) LocalityType() string

LocalityType Returns the locality-type for AWS environment.

func (*AwsLocation) Region

func (a *AwsLocation) Region() (string, error)

Region Returns the sublocation of the cloud platform the current server is running on.

func (*AwsLocation) SdlCloudName

func (a *AwsLocation) SdlCloudName() string

SdlCloudName Returns s3, the proper string SDL associates with AWS.

type GcpLocation

type GcpLocation struct{}

GcpLocation A location for GCP environment.

func (*GcpLocation) Locality

func (g *GcpLocation) Locality() (string, error)

Locality Returns the locality for GCP environment.

func (*GcpLocation) LocalityType

func (g *GcpLocation) LocalityType() string

LocalityType Returns the locality-type for GCP environment.

func (*GcpLocation) Region

func (g *GcpLocation) Region() (string, error)

Region Returns the sublocation of the cloud platform the current server is running on.

func (*GcpLocation) SdlCloudName

func (g *GcpLocation) SdlCloudName() string

SdlCloudName Returns gs, the proper string SDL associates with GCP.

type Locator

type Locator interface {
	SdlCloudName() string
	Region() (string, error)
	Locality() (string, error)
	LocalityType() string
}

Locator Interface that describes everything needed to describe a location for the SDL API.

func GenerateLocator

func GenerateLocator() (Locator, error)

GenerateLocator Determines which locator to use by attempting to detect what cloud platform it is running on.

type ManualLocation

type ManualLocation struct {
	// contains filtered or unexported fields
}

ManualLocation A location for a manual environment.

func NewManualLocation

func NewManualLocation(location string) (*ManualLocation, error)

NewManualLocation Returns a new manual location with the provided platform.

func (*ManualLocation) Locality

func (m *ManualLocation) Locality() (string, error)

Locality Returns the locality for a manual environment.

func (*ManualLocation) LocalityType

func (m *ManualLocation) LocalityType() string

LocalityType Returns the locality-type "forced" for a manual environment.

func (*ManualLocation) Region

func (m *ManualLocation) Region() (string, error)

Region Returns the sublocation of the cloud platform the current server is running on.

func (*ManualLocation) SdlCloudName

func (m *ManualLocation) SdlCloudName() string

SdlCloudName Returns whatever it was given as the cloud name.

Jump to

Keyboard shortcuts

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