Documentation ¶
Index ¶
- Constants
- type AccountAction
- type Agent
- func (a *Agent) CanAccessShare(shrId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) CanCreateEnvironment(acctId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) CanCreateShare(acctId, envId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) Handle(u *metrics.Usage) error
- func (a *Agent) Start()
- func (a *Agent) Stop()
- type Bandwidth
- type BandwidthConfig
- type BandwidthPerPeriod
- type Config
- type EnvironmentAction
- type ShareAction
Constants ¶
View Source
const Unlimited = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAction ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) CanAccessShare ¶
func (*Agent) CanCreateEnvironment ¶
func (*Agent) CanCreateShare ¶
type BandwidthConfig ¶
type BandwidthConfig struct { PerAccount *BandwidthPerPeriod PerEnvironment *BandwidthPerPeriod }
type BandwidthPerPeriod ¶
func DefaultBandwidthPerPeriod ¶
func DefaultBandwidthPerPeriod() *BandwidthPerPeriod
type Config ¶
type Config struct { Environments int Bandwidth *BandwidthConfig Cycle time.Duration Enforcing bool }
func DefaultConfig ¶
func DefaultConfig() *Config
type EnvironmentAction ¶
type EnvironmentAction interface {
HandleEnvironment(e *store.Environment, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error
}
type ShareAction ¶
type ShareAction interface {
} Click to show internal directories.
Click to hide internal directories.