Documentation ¶
Overview ¶
Package endpoints implements endpoints code.
Index ¶
- Constants
- Variables
- func ConstructRegionFromZone(zone string) string
- func FetchEndpoints(serviceID string, serviceEndpoint []ServiceEndpoint) string
- func FetchPVSEndpoint(region string, serviceEndpoint []ServiceEndpoint) string
- func FetchRCEndpoint(serviceEndpoint []ServiceEndpoint) string
- func FetchVPCEndpoint(region string, serviceEndpoint []ServiceEndpoint) string
- type ServiceEndpoint
Constants ¶
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" // TransitGateway service. TransitGateway serviceID = "transitgateway" // COS service. COS serviceID = "cos" // RM used to identify Resource-Manager service. RM serviceID = "rm" )
Variables ¶
var ServiceEndpointFormat string
ServiceEndpointFormat is used to identify the custom endpoint of IBM Cloud service.
Functions ¶
func ConstructRegionFromZone ¶ added in v0.8.0
ConstructRegionFromZone Calculate region based on location/zone.
func FetchEndpoints ¶ added in v0.8.0
func FetchEndpoints(serviceID string, serviceEndpoint []ServiceEndpoint) string
FetchEndpoints returns the endpoint associated with serviceID otherwise empty string.
func FetchPVSEndpoint ¶
func FetchPVSEndpoint(region string, serviceEndpoint []ServiceEndpoint) string
FetchPVSEndpoint will return PowerVS service endpoint. Deprecated: User FetchEndpoints instead.
func FetchRCEndpoint ¶
func FetchRCEndpoint(serviceEndpoint []ServiceEndpoint) string
FetchRCEndpoint will return resource controller endpoint. Deprecated: User FetchEndpoints instead.
func FetchVPCEndpoint ¶
func FetchVPCEndpoint(region string, serviceEndpoint []ServiceEndpoint) string
FetchVPCEndpoint will return VPC service endpoint.
Types ¶
type ServiceEndpoint ¶
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.