quota

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuotaService

type QuotaService struct {
	Storage quota.QuotaStorage
}

func (*QuotaService) Get

func (s *QuotaService) Get(appName string) (*quota.Quota, error)

Get implements Get method from QuotaService interface

func (*QuotaService) Inc

func (s *QuotaService) Inc(appName string, quantity int) error

Inc implements Inc method from QuotaService interface

func (*QuotaService) Set

func (s *QuotaService) Set(appName string, inUse int) error

Set redefines the inuse units of the app. This new value must be smaller than or equal to the current limit of the app. It also must be a non negative number. Set implements Set method from QuotaService interface

func (*QuotaService) SetLimit

func (s *QuotaService) SetLimit(appName string, limit int) error

SetLimit redefines the limit of the app. The new limit must be bigger than or equal to the current number of units in the app. The new limit may be smaller than 0, which means that the app should have an unlimited number of units. SetLimit implements SetLimit method from QuotaService interface

Jump to

Keyboard shortcuts

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