Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultServiceQuota = util.GetEnvInt("QUOTA_SERVICE", defaultServiceLimit) DefaultInstanceQuota = util.GetEnvInt("QUOTA_INSTANCE", defaultInstanceLimit) DefaultSchemaQuota = util.GetEnvInt("QUOTA_SCHEMA", defaultSchemaLimit) DefaultTagQuota = util.GetEnvInt("QUOTA_TAG", defaultTagLimit) DefaultRuleQuota = util.GetEnvInt("QUOTA_RULE", defaultRuleLimit) )
Functions ¶
This section is empty.
Types ¶
type ApplyQuotaResource ¶
type ApplyQuotaResource struct { QuotaType ResourceType DomainProject string ServiceID string QuotaSize int64 }
func NewApplyQuotaResource ¶
func NewApplyQuotaResource(quotaType ResourceType, domainProject, serviceID string, quotaSize int64) *ApplyQuotaResource
type ApplyQuotaResult ¶
func NewApplyQuotaResult ¶
func NewApplyQuotaResult(reporter Reporter, err *scerr.Error) *ApplyQuotaResult
func (*ApplyQuotaResult) Close ¶
func (r *ApplyQuotaResult) Close(ctx context.Context)
func (*ApplyQuotaResult) ReportUsedQuota ¶
func (r *ApplyQuotaResult) ReportUsedQuota(ctx context.Context) error
type Manager ¶
type Manager interface { Apply4Quotas(ctx context.Context, res *ApplyQuotaResource) *ApplyQuotaResult RemandQuotas(ctx context.Context, quotaType ResourceType) }
type ResourceType ¶
type ResourceType int
const ( RuleQuotaType ResourceType = iota SchemaQuotaType TagQuotaType MicroServiceQuotaType MicroServiceInstanceQuotaType )
func (ResourceType) String ¶
func (r ResourceType) String() string
Click to show internal directories.
Click to hide internal directories.