Documentation ¶
Index ¶
- Variables
- type Amount
- type Count
- type DataSize
- type Dirtyable
- type ExceededError
- type Limited
- type Limiter
- type Measure
- type TrackingLimiter
- func (l *TrackingLimiter) ClearDirty()
- func (l *TrackingLimiter) Current(limited Limited) Amount
- func (l *TrackingLimiter) IsDirty() bool
- func (l *TrackingLimiter) Maximum(limited Limited) Amount
- func (l *TrackingLimiter) Override(limited Limited) Amount
- func (l *TrackingLimiter) SetCurrent(limited Limited, current Amount)
- func (l *TrackingLimiter) SetOverride(limited Limited, override Amount)
Constants ¶
This section is empty.
Variables ¶
View Source
var NotApplicable = notApplicable{}
View Source
var Unknown = unknown{}
Functions ¶
This section is empty.
Types ¶
type ExceededError ¶
type ExceededError struct { gomerr.Gomerr Limiter interface{} Limited interface{} Limit Amount Current Amount Attempted Amount }
func Exceeded ¶
func Exceeded(limiter, limited interface{}, limit, current, attempted Amount) *ExceededError
func UnquantifiedExcess ¶
func UnquantifiedExcess(limiter, limited interface{}) *ExceededError
type TrackingLimiter ¶
type TrackingLimiter struct { Currents map[string]amount Overrides map[string]amount // contains filtered or unexported fields }
func (*TrackingLimiter) ClearDirty ¶
func (l *TrackingLimiter) ClearDirty()
func (*TrackingLimiter) Current ¶
func (l *TrackingLimiter) Current(limited Limited) Amount
func (*TrackingLimiter) IsDirty ¶
func (l *TrackingLimiter) IsDirty() bool
func (*TrackingLimiter) Maximum ¶
func (l *TrackingLimiter) Maximum(limited Limited) Amount
func (*TrackingLimiter) Override ¶
func (l *TrackingLimiter) Override(limited Limited) Amount
func (*TrackingLimiter) SetCurrent ¶
func (l *TrackingLimiter) SetCurrent(limited Limited, current Amount)
func (*TrackingLimiter) SetOverride ¶
func (l *TrackingLimiter) SetOverride(limited Limited, override Amount)
Click to show internal directories.
Click to hide internal directories.