buildin

package
v1.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonQuotaCheck

func CommonQuotaCheck(ctx context.Context, res *quota.ApplyQuotaResource,
	getLimitQuota GetLimitQuota, getCurUsedNum GetCurUsedNum) *quota.ApplyQuotaResult

func InitConfigs

func InitConfigs()

func New

func New() mgr.Instance

Types

type GetCurUsedNum

type GetCurUsedNum func(context.Context, *quota.ApplyQuotaResource) (int64, error)

type GetLimitQuota

type GetLimitQuota func() int64

type GlobalCounter

type GlobalCounter struct {
	ServiceCount  int64
	InstanceCount int64
}

func (*GlobalCounter) OnCreate

func (c *GlobalCounter) OnCreate(t discovery.Type, domainProject string)

func (*GlobalCounter) OnDelete

func (c *GlobalCounter) OnDelete(t discovery.Type, domainProject string)

type Quota

type Quota struct {
}

func (*Quota) Apply4Quotas

func (q *Quota) Apply4Quotas(ctx context.Context, res *quota.ApplyQuotaResource) *quota.ApplyQuotaResult

申请配额sourceType serviceinstance servicetype

func (*Quota) RemandQuotas

func (q *Quota) RemandQuotas(ctx context.Context, quotaType quota.ResourceType)

向配额中心上报配额使用量

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL