Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProvidersKeyPrefix = "/providers/" ProviderAddrTTL = 24 * time.Hour )
Variables ¶
View Source
var ProvideValidity = time.Hour * 48
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*ProviderManager) error
Option 是设置提供者管理器选项的函数。
func CleanupInterval ¶
CleanupInterval 设置 GC 运行之间的时间。 默认为 1 小时。
type ProviderManager ¶
type ProviderManager struct {
// contains filtered or unexported fields
}
ProviderManager 在数据存储中添加和拉出提供者,并在两者之间缓存它们
func NewProviderManager ¶
func (*ProviderManager) AddProvider ¶
AddProvider 添加提供商
func (*ProviderManager) Close ¶
func (pm *ProviderManager) Close() error
func (*ProviderManager) GetProviders ¶
GetProviders 返回给定键的提供者集。 该方法不复制集合。 不要修改它。
Click to show internal directories.
Click to hide internal directories.