Documentation ¶
Index ¶
- Constants
- func AddEndpointMapping(regionId, productId, endpoint string) (err error)
- func CheckCacheIsExpire(cacheKey string) bool
- func Resolve(param *ResolveParam) (endpoint string, err error)
- type EndpointObj
- type EndpointsObj
- type GetEndpointResponse
- type LocalGlobalResolver
- type LocalRegionalResolver
- type LocationResolver
- type MappingResolver
- type ResolveParam
- type Resolver
- type SimpleHostResolver
Constants ¶
View Source
const (
// EndpointCacheExpireTime in seconds
EndpointCacheExpireTime = 3600
)
View Source
const (
// ResolveEndpointUserGuideLink returns guide link
ResolveEndpointUserGuideLink = ""
)
Variables ¶
This section is empty.
Functions ¶
func AddEndpointMapping ¶
AddEndpointMapping adds endpoint to cache
func CheckCacheIsExpire ¶
CheckCacheIsExpire valid the cacheKey
func Resolve ¶
func Resolve(param *ResolveParam) (endpoint string, err error)
Resolve returns endpoint
Types ¶
type EndpointObj ¶
type EndpointObj struct { Protocols map[string]string Type string Namespace string Id string SerivceCode string Endpoint string }
EndpointObj wrapper endpoint
type EndpointsObj ¶
type EndpointsObj struct {
Endpoint []EndpointObj
}
EndpointsObj wrapper Endpoint array
type GetEndpointResponse ¶
type GetEndpointResponse struct { Endpoints *EndpointsObj RequestId string Success bool }
GetEndpointResponse returns Endpoints
type LocalGlobalResolver ¶
type LocalGlobalResolver struct{}
LocalGlobalResolver is global resolver
func (*LocalGlobalResolver) TryResolve ¶
func (resolver *LocalGlobalResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
TryResolve returns endpoint
type LocalRegionalResolver ¶
type LocalRegionalResolver struct{}
LocalRegionalResolver is regional resolver
func (*LocalRegionalResolver) TryResolve ¶
func (resolver *LocalRegionalResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
TryResolve returns endpoint
type LocationResolver ¶
type LocationResolver struct{}
LocationResolver is kind of resolver
func (*LocationResolver) TryResolve ¶
func (resolver *LocationResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
TryResolve return endpoint
type MappingResolver ¶
type MappingResolver struct{}
MappingResolver is kind of resolver
func (*MappingResolver) TryResolve ¶
func (resolver *MappingResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
TryResolve returns endpoint
type ResolveParam ¶
type ResolveParam struct { Domain string Product string RegionId string LocationProduct string LocationEndpointType string CommonApi func(request *requests.CommonRequest) (response *responses.CommonResponse, err error) `json:"-"` }
ResolveParam params to resolve endpoint
type Resolver ¶
type Resolver interface {
TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
}
Resolver interface
type SimpleHostResolver ¶
type SimpleHostResolver struct{}
SimpleHostResolver is kind of resolver
func (*SimpleHostResolver) TryResolve ¶
func (resolver *SimpleHostResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
TryResolve returns endpoint
Click to show internal directories.
Click to hide internal directories.