workers

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package workers exposes backend interfaces used by worker groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallFreq added in v1.6.0

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

func NewCallFreq added in v1.6.0

func NewCallFreq(rateLimit int, tickFreq time.Duration) *CallFreq

func (CallFreq) IsRateLimitDefined added in v1.6.0

func (q CallFreq) IsRateLimitDefined() bool

func (CallFreq) IsTickFreqDefined added in v1.6.0

func (q CallFreq) IsTickFreqDefined() bool

func (CallFreq) RateLimit added in v1.6.0

func (q CallFreq) RateLimit() int

func (CallFreq) TickFreq added in v1.6.0

func (q CallFreq) TickFreq() time.Duration

type Config

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

func NewConfig added in v1.5.0

func NewConfig(enabled bool, freq *CallFreq, replicas int32) *Config

func (*Config) GetEnabled added in v1.5.0

func (c *Config) GetEnabled() bool

func (*Config) GetFreq added in v1.6.0

func (c *Config) GetFreq() orchestrator.Freq

func (*Config) GetReplicas added in v1.5.0

func (c *Config) GetReplicas() int

func (*Config) SetEnabled added in v1.5.0

func (c *Config) SetEnabled(v bool)

func (*Config) SetFreq added in v1.6.0

func (c *Config) SetFreq(freq *CallFreq)

func (*Config) SetReplicas added in v1.5.0

func (c *Config) SetReplicas(n int)

type EvictionBackend

type EvictionBackend interface {
	Len() int64
	Mem() int64
	SoftMemoryLimitOvercome() bool
	SoftEvictUntilWithinLimit(backoff int64) (freed, evicted int64)
}

type RefreshBackend

type RefreshBackend interface {
	Len() int64
	Mem() int64
	PeekExpiredTTL() (*model.Entry, bool)
	OnTTL(entry *model.Entry) error
}

Directories

Path Synopsis
Package evictor provides a scalable worker Group implementing service.Service and service.Scalable.
Package evictor provides a scalable worker Group implementing service.Service and service.Scalable.
Package refresher provides a scalable worker Group implementing service.Service and service.Scalable.
Package refresher provides a scalable worker Group implementing service.Service and service.Scalable.

Jump to

Keyboard shortcuts

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