Documentation ¶
Index ¶
- Constants
- func AddNotSuccessRetryCondition(r *resty.Client) *resty.Client
- func GenerateHashForMapValues(labels map[string]string) uint64
- func GetAuthRequest(authorization string) *resty.Request
- func GetCusAuthRequest(retryCount int, retryWaitMills int, totalTimeoutSeconds int, ...) *resty.Request
- func GetExternalIP() (net.IP, error)
- func GetHostFromUrl(urlStr string) (string, string)
- func GetHttpClient(timeout time.Duration) *http.Client
- func GetLocalHostIP() (net.IP, error)
- func GetLocalIpStr() (string, error)
- func GetMapByArray(pool map[string]string, roles []string) (map[string]string, error)
- func GetMonitorRestyClient(retryCount int, retryWaitMills int, totalTimeoutSeconds int) *resty.Client
- func GetNewRestyClient(retryCount int, retryWaitMills int, totalTimeoutSeconds int) *resty.Client
- func GetRestyClient(retryCount int, retryWaitMills int, totalTimeoutSeconds int) *resty.Client
- func GetRestyRetryClient(timeout time.Duration) *resty.Client
- func GetShortAuthRequest(authorization string) *resty.Request
- func HasKeysInLabels(labels map[string]string, keys []string) bool
- type Aa
- type SortedTimeStringMapList
- type SyncMap
Constants ¶
View Source
const ( // SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is // used to separate label names, label values, and other strings from each other // when calculating their combined hash value (aka signature aka fingerprint). SeparatorByte byte = 255 )
Variables ¶
This section is empty.
Functions ¶
func AddNotSuccessRetryCondition ¶
func AddNotSuccessRetryCondition(r *resty.Client) *resty.Client
func GetAuthRequest ¶
func GetAuthRequest(authorization string) *resty.Request
func GetCusAuthRequest ¶
func GetCusAuthRequest(retryCount int, retryWaitMills int, totalTimeoutSeconds int, authorization string) *resty.Request
retryCount: 重试次数; retryWaitMills: 每次请求之间等待的毫秒数; totalTimeoutSeconds 包括重试,总超时时间; authorization: header Authorization
func GetExternalIP ¶
func GetLocalIpStr ¶
func GetMapByArray ¶
func GetMonitorRestyClient ¶
func GetMonitorRestyClient(retryCount int, retryWaitMills int, totalTimeoutSeconds int) *resty.Client
retryCount: 重试次数; retryWaitMills: 每次请求之间等待的毫秒数; totalTimeoutSeconds 包括重试,总超时时间; 每个请求超时时间 ~= totalTimeoutSeconds / retryCount
func GetNewRestyClient ¶
retryCount: 重试次数; retryWaitMills: 每次请求之间等待的毫秒数; totalTimeoutSeconds 包括重试,总超时时间; 每个请求超时时间 ~= totalTimeoutSeconds / retryCount
func GetRestyClient ¶
先从缓存查,查不到创建新的 retryCount: 重试次数; retryWaitMills: 每次请求之间等待的毫秒数; totalTimeoutSeconds 包括重试,总超时时间; 每个请求超时时间 ~= totalTimeoutSeconds / retryCount
func GetRestyRetryClient ¶
func GetShortAuthRequest ¶
func GetShortAuthRequest(authorization string) *resty.Request
Types ¶
type SortedTimeStringMapList ¶
func (SortedTimeStringMapList) Get ¶
func (s SortedTimeStringMapList) Get() []map[string]string
func (SortedTimeStringMapList) Len ¶
func (s SortedTimeStringMapList) Len() int
func (SortedTimeStringMapList) Less ¶
func (s SortedTimeStringMapList) Less(i, j int) bool
func (SortedTimeStringMapList) Swap ¶
func (s SortedTimeStringMapList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.