endpoints

package
v0.3.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package endpoints implements endpoints code.

Index

Constants

View Source
const (
	// VPC used to identify VPC service.
	VPC serviceID = "vpc"
	// PowerVS used to identify PowerVS service.
	PowerVS serviceID = "powervs"
	// RC used to identify Resource-Controller service.
	RC serviceID = "rc"
)

Variables

View Source
var ServiceEndpointFormat string

ServiceEndpointFormat is used to identify the custom endpoint of IBM Cloud service.

Functions

func CostructRegionFromZone

func CostructRegionFromZone(zone string) string

CostructRegionFromZone Calculate region based on location/zone.

func FetchPVSEndpoint

func FetchPVSEndpoint(region string, serviceEndpoint []ServiceEndpoint) string

FetchPVSEndpoint will return PowerVS service endpoint.

func FetchRCEndpoint

func FetchRCEndpoint(serviceEndpoint []ServiceEndpoint) string

FetchRCEndpoint will return resource controller endpoint.

func FetchVPCEndpoint

func FetchVPCEndpoint(region string, serviceEndpoint []ServiceEndpoint) string

FetchVPCEndpoint will return VPC service endpoint.

Types

type ServiceEndpoint

type ServiceEndpoint struct {
	ID     string
	URL    string
	Region string
}

ServiceEndpoint holds the Service endpoint specific information.

func ParseServiceEndpointFlag

func ParseServiceEndpointFlag(serviceEndpoints string) ([]ServiceEndpoint, error)

ParseServiceEndpointFlag parses the command line flag of service endpoint in the format ${ServiceRegion}:${ServiceID1}=${URL1},${ServiceID2}=${URL2...} returning a list of ServiceEndpoint.

Jump to

Keyboard shortcuts

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