Versions in this module Expand all Collapse all v1 v1.9.18 Jun 18, 2024 v1.9.15 Jun 17, 2024 Changes in this version + const CpuSecondsLimitHumanReadableFieldName + const DelayDefault + const DelayFieldName + const MemoryLimitEnvFieldName + const MemoryLimitHumanReadableFieldName + const ProcessLimitEnvFieldName + var Component = &app.Component + var CpuSecondsLimitHumanReadable = os.Getenv(ProcessLimitEnvFieldName) + var MemoryLimitHumanReadableDefault = os.Getenv(MemoryLimitEnvFieldName) + type Config struct + CpuSecondsLimit uint32 + CpuSecondsLimitHumanReadable string + Delay time.Duration + MemoryLimit uint64 + MemoryLimitHumanReadable string + func Configuration(config *Config, configurator configurator.Configurator) (*Config, error) + func NewConfig() *Config + type GetQuotas func(appConfig *app.Config, logger logger.Logger) (uint64, uint32, error) + type Metric struct + func NewMetric(appConfig *app.Config) *Metric + type Quota interface + Memory func() uint64 + Processes func() uint8 + func New(config *Config, appConfig *app.Config, getQuotas GetQuotas, metric *Metric, ...) Quota + func NewWithConfigurator(config *Config, configurator configurator.Configurator, appConfig *app.Config, ...) (Quota, error) + type ReConfiguration struct + func NewReConfiguration(appConfig *app.Config, logger logger.Logger, config *Config, metric *Metric) *ReConfiguration + func NewReConfigurationWithConfigurator(config *Config, configurator configurator.Configurator, appConfig *app.Config, ...) (*ReConfiguration, error) + func (reConfiguration *ReConfiguration) Memory() uint64 + func (reConfiguration *ReConfiguration) Process(ctx context.Context) error + func (reConfiguration *ReConfiguration) Processes() uint8 + func (reConfiguration *ReConfiguration) Quota() Quota + func (reConfiguration *ReConfiguration) ReConfiguration(configurator configurator.Configurator) error