Documentation ¶
Overview ¶
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- 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 ResolveParam
- type Resolver
- type SimpleHostResolver
Constants ¶
View Source
const (
EndpointCacheExpireTime = 3600 //Seconds
)
View Source
const (
ResolveEndpointUserGuideLink = ""
)
Variables ¶
This section is empty.
Functions ¶
func CheckCacheIsExpire ¶
func Resolve ¶
func Resolve(param *ResolveParam) (endpoint string, err error)
Types ¶
type EndpointObj ¶
type EndpointsObj ¶
type EndpointsObj struct {
Endpoint []EndpointObj
}
type GetEndpointResponse ¶
type GetEndpointResponse struct { Endpoints *EndpointsObj RequestId string Success bool }
type LocalGlobalResolver ¶
type LocalGlobalResolver struct { }
func (*LocalGlobalResolver) TryResolve ¶
func (resolver *LocalGlobalResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
type LocalRegionalResolver ¶
type LocalRegionalResolver struct { }
func (*LocalRegionalResolver) TryResolve ¶
func (resolver *LocalRegionalResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
type LocationResolver ¶
type LocationResolver struct { }
func (*LocationResolver) TryResolve ¶
func (resolver *LocationResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
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:"-"` }
func (*ResolveParam) String ¶
func (param *ResolveParam) String() string
type Resolver ¶
type Resolver interface {
TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
}
type SimpleHostResolver ¶
type SimpleHostResolver struct { }
func (*SimpleHostResolver) TryResolve ¶
func (resolver *SimpleHostResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error)
Click to show internal directories.
Click to hide internal directories.