refactor(store): remove redundant scoped quota constructor
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d854e1c98e
commit
1c004d4d8a
1 changed files with 0 additions and 10 deletions
10
scope.go
10
scope.go
|
|
@ -102,16 +102,6 @@ func NewScopedConfigured(storeInstance *Store, scopedConfig ScopedStoreConfig) (
|
|||
return scopedStore, nil
|
||||
}
|
||||
|
||||
// Usage example: `scopedStore, err := store.NewScopedWithQuota(storeInstance, "tenant-a", store.QuotaConfig{MaxKeys: 100, MaxGroups: 10}); if err != nil { return }`
|
||||
// Prefer `NewScopedConfigured(store.ScopedStoreConfig{...})` when the full
|
||||
// namespace and quota configuration are already known at the call site.
|
||||
func NewScopedWithQuota(storeInstance *Store, namespace string, quota QuotaConfig) (*ScopedStore, error) {
|
||||
return NewScopedConfigured(storeInstance, ScopedStoreConfig{
|
||||
Namespace: namespace,
|
||||
Quota: quota,
|
||||
})
|
||||
}
|
||||
|
||||
func (scopedStore *ScopedStore) namespacedGroup(group string) string {
|
||||
return scopedStore.namespace + ":" + group
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue