Documentation
¶
Index ¶
- Constants
- type BadConfigError
- type ConfigNotFoundError
- type NoEarsInstances
- type QuotaLimiter
- type QuotaManager
- func (m *QuotaManager) PublishQuota(ctx context.Context, tid tenant.Id) error
- func (m *QuotaManager) Start()
- func (m *QuotaManager) Stop()
- func (m *QuotaManager) SyncItem(ctx context.Context, tid tenant.Id, itemId string, add bool) error
- func (m *QuotaManager) TenantLimit(ctx context.Context, tid tenant.Id) int
- func (m *QuotaManager) Wait(ctx context.Context, tid tenant.Id) error
Constants ¶
View Source
const LimiterTypeInMemory = "inmemory"
View Source
const LimiterTypeNone = "none"
View Source
const LimiterTypeRedis = "redis"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadConfigError ¶
type BadConfigError struct {
// contains filtered or unexported fields
}
func (*BadConfigError) Error ¶
func (e *BadConfigError) Error() string
type ConfigNotFoundError ¶
type ConfigNotFoundError struct {
// contains filtered or unexported fields
}
func (*ConfigNotFoundError) Error ¶
func (e *ConfigNotFoundError) Error() string
type NoEarsInstances ¶
type NoEarsInstances struct { }
func (*NoEarsInstances) Error ¶
func (e *NoEarsInstances) Error() string
type QuotaLimiter ¶
type QuotaLimiter struct {
// contains filtered or unexported fields
}
Quota limiter implements an additional Wait function
func NewQuotaLimiter ¶
func (*QuotaLimiter) AdaptiveLimit ¶
func (r *QuotaLimiter) AdaptiveLimit() int
func (*QuotaLimiter) Limit ¶
func (r *QuotaLimiter) Limit() int
func (*QuotaLimiter) SetLimit ¶
func (r *QuotaLimiter) SetLimit(newLimit int) error
type QuotaManager ¶
type QuotaManager struct {
// contains filtered or unexported fields
}
func NewQuotaManager ¶
func NewQuotaManager(logger *zerolog.Logger, tenantStorer tenant.TenantStorer, syncer syncer.DeltaSyncer, config config.Config) (*QuotaManager, error)
func (*QuotaManager) PublishQuota ¶
PublishQuota publishes tenant quota to ratelimiters in all nodes so they can sync to the new quota
func (*QuotaManager) Start ¶
func (m *QuotaManager) Start()
func (*QuotaManager) Stop ¶
func (m *QuotaManager) Stop()
func (*QuotaManager) TenantLimit ¶
Click to show internal directories.
Click to hide internal directories.