Documentation ¶
Index ¶
Constants ¶
View Source
const (
// 默认请求等待时间
RequestWaitingTime = 10 * 60 * 1000
)
Variables ¶
View Source
var UserAgentManager = &userAgentManager{
priority: -1,
}
Functions ¶
func NewBaseSecretManagerClientBuilder ¶
func NewBaseSecretManagerClientBuilder() *baseSecretManagerClientBuilder
func NewDefaultSecretManagerClientBuilder ¶
func NewDefaultSecretManagerClientBuilder() *defaultSecretManagerClientBuilder
Types ¶
type BackoffStrategy ¶
type BackoffStrategy interface { // 初始化策略 Init() error // 获取规避等待时间,时间单位MS GetWaitTimeExponential(retryTimes int) int64 }
BackoffStrategy 规避重试策略接口
type FullJitterBackoffStrategy ¶
type FullJitterBackoffStrategy struct { //重试最大尝试次数 RetryMaxAttempts int // 重试时间间隔,单位ms RetryInitialIntervalMills int64 // 最大等待时间,单位ms Capacity int64 }
func NewFullJitterBackoffStrategy ¶
func NewFullJitterBackoffStrategy(retryMaxAttempts int, retryInitialIntervalMills int64, capacity int64) *FullJitterBackoffStrategy
func (*FullJitterBackoffStrategy) GetWaitTimeExponential ¶
func (fbs *FullJitterBackoffStrategy) GetWaitTimeExponential(retryTimes int) int64
func (*FullJitterBackoffStrategy) Init ¶
func (fbs *FullJitterBackoffStrategy) Init() error
type RefreshSecretStrategy ¶
type RefreshSecretStrategy interface { // 初始化刷新策略 Init() error // 获取下一次secret刷新执行的时间 GetNextExecuteTime(secretName string, ttl, offsetTimestamp int64) int64 // 通过secret信息解析下一次secret刷新执行的时间 ParseNextExecuteTime(cacheSecretInfo *models.CacheSecretInfo) int64 // 根据凭据信息解析轮转时间间隔,单位MS ParseTTL(secretInfo *models.SecretInfo) int64 // 关闭,释放资源 Close() error }
刷新Secret的策略
func NewDefaultRefreshSecretStrategy ¶
func NewDefaultRefreshSecretStrategy(jsonTTLPropertyName string) RefreshSecretStrategy
type SecretManagerClient ¶
type SecretManagerClient interface { // 初始化Client Init() error // 获取指定凭据信息 GetSecretValue(req *kms.GetSecretValueRequest) (*kms.GetSecretValueResponse, error) // 关闭Client Close() error }
Click to show internal directories.
Click to hide internal directories.