workers

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 2 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 Config

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

func NewConfig added in v1.5.0

func NewConfig(enabled bool, tickLimit int64, replicas int32) *Config

func (*Config) GetEnabled added in v1.5.0

func (c *Config) GetEnabled() bool

func (*Config) GetLimitOrInterval added in v1.5.0

func (c *Config) GetLimitOrInterval() int64

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) SetLimitOrInterval added in v1.5.0

func (c *Config) SetLimitOrInterval(limit int64)

func (*Config) SetReplicas added in v1.5.0

func (c *Config) SetReplicas(n int)

type EvictionBackend

type EvictionBackend interface {
	Len() int64
	Mem() int64
	ShouldEvictSoft() (bytes int64, should bool)
	ShouldEvictHard() (bytes int64, should bool)
	EvictN(n, shardSample, entriesSample int) (freedBytes, items int64)
}

type RefreshBackend

type RefreshBackend interface {
	Len() int64
	Mem() int64
	ScanOutdatedN(dst []*model.Entry, shardSample, entrySample int) (out []*model.Entry, found int)
	Refresh(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 gc provides a scalable worker Group implementing service.Service and service.Scalable, identical по архитектуре evictor.Group, но вместо эвикции делает принудительный GC.
Package gc provides a scalable worker Group implementing service.Service and service.Scalable, identical по архитектуре evictor.Group, но вместо эвикции делает принудительный GC.
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