Help us shape the future of Go! Take the 2026 Go Developer Survey

limits

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAction

type AccountAction interface {
	HandleAccount(a *store.Account, rxBytes, txBytes int64, bwc store.BandwidthClass, ul *userLimits, trx *sqlx.Tx) error
}

type Agent

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

func NewAgent

func NewAgent(cfg *Config, ifxCfg *metrics.InfluxConfig, zCfg *zrokEdgeSdk.Config, emailCfg *emailUi.Config, str *store.Store) (*Agent, error)

func (*Agent) CanAccessShare

func (a *Agent) CanAccessShare(shrId int, trx *sqlx.Tx) (bool, error)

func (*Agent) CanCreateEnvironment

func (a *Agent) CanCreateEnvironment(acctId int, trx *sqlx.Tx) (bool, error)

func (*Agent) CanCreateShare

func (a *Agent) CanCreateShare(acctId, envId int, reserved, uniqueName bool, _ sdk.ShareMode, backendMode sdk.BackendMode, trx *sqlx.Tx) (bool, error)

func (*Agent) DroppedEvents added in v1.1.12

func (a *Agent) DroppedEvents() uint64

func (*Agent) Handle

func (a *Agent) Handle(u *metrics.Usage) error

func (*Agent) HandleContext added in v1.1.12

func (a *Agent) HandleContext(ctx context.Context, u *metrics.Usage) error

func (*Agent) Start

func (a *Agent) Start()

func (*Agent) Stop

func (a *Agent) Stop()

type Bandwidth

type Bandwidth struct {
	Rx    int64
	Tx    int64
	Total int64
}

type BandwidthPerPeriod

type BandwidthPerPeriod struct {
	Period  time.Duration
	Warning *Bandwidth
	Limit   *Bandwidth
}

func DefaultBandwidthPerPeriod

func DefaultBandwidthPerPeriod() *BandwidthPerPeriod

type Config

type Config struct {
	Environments   int
	Shares         int
	ReservedShares int
	UniqueNames    int
	ShareFrontends int
	Bandwidth      *BandwidthPerPeriod
	Cycle          time.Duration
	Enforcing      bool
	HandoffTimeout time.Duration
}

func DefaultConfig

func DefaultConfig() *Config

Jump to

Keyboard shortcuts

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