quota

package
v0.0.0-...-9b598c7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultQuotaServiceFactory

func NewDefaultQuotaServiceFactory(
	amsClient ocm.AMSClient,
	connectionFactory *db.ConnectionFactory,
	quotaManagementListConfig *quota_management.QuotaManagementListConfig,
	kafkaConfig *config.KafkaConfig,
) services.QuotaServiceFactory

Types

type DefaultQuotaServiceFactory

type DefaultQuotaServiceFactory struct {
	// contains filtered or unexported fields
}

DefaultQuotaServiceFactory the default implementation for ProviderFactory

func (*DefaultQuotaServiceFactory) GetQuotaService

func (factory *DefaultQuotaServiceFactory) GetQuotaService(quotaType api.QuotaType) (services.QuotaService, *errors.ServiceError)

type QuotaManagementListService

type QuotaManagementListService struct {
	// contains filtered or unexported fields
}

func (QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType

func (q QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType(username string, organisationId string, instanceType types.KafkaInstanceType, kafkaBillingModel config.KafkaBillingModel) (bool, *errors.ServiceError)

CheckIfQuotaIsDefinedForInstanceType - returns if there is any quota configuration for the given instanceType/billingAccount pair (either organization or service account)

func (QuotaManagementListService) DeleteQuota

func (q QuotaManagementListService) DeleteQuota(SubscriptionId string) *errors.ServiceError

func (QuotaManagementListService) DeleteQuotaForBillingModel

func (q QuotaManagementListService) DeleteQuotaForBillingModel(subscriptionId string, kafkaBillingModel config.KafkaBillingModel) *errors.ServiceError

func (QuotaManagementListService) IsQuotaEntitlementActive

func (q QuotaManagementListService) IsQuotaEntitlementActive(kafka *dbapi.KafkaRequest) (bool, error)

Checks if quota used by the given Kafka instance is granted to the organisation/user and if it is active, not expired, in the quota management list configuration Note that organisation will always take priority over individual accounts to mimic the behaviour of quota allowance checks during Kafka creation.

func (QuotaManagementListService) ReserveQuota

ReserveQuota - tries to reserve the quota for the received kafka request

func (QuotaManagementListService) ReserveQuotaIfNotAlreadyReserved

func (q QuotaManagementListService) ReserveQuotaIfNotAlreadyReserved(kafka *dbapi.KafkaRequest) (string, *errors.ServiceError)

func (QuotaManagementListService) ValidateBillingAccount

func (q QuotaManagementListService) ValidateBillingAccount(organisationId string, instanceType types.KafkaInstanceType, billingModelID string, billingCloudAccountId string, marketplace *string) *errors.ServiceError

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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