interfaces

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager interface {
	// add a new node with specific id and priority/value
	Add(string, int64) error
	// add a new node with specific id and default priority/value
	AddDefault(string) error
	// update value for given id, which would reflect in order
	Update(id string, value int64) error
	// default bump value for given id, which would reflect in order
	UpdateDefault(string) error
	// check if value exists
	Exists(string) bool
	// get value/priority of given id
	Get(string) (int64, error)
	// delete item with id from cache
	Delete(id string) error
	// get a list of all keys / values
	GetItems() ([]string, []int64)
	// peek top of queue (no evict)
	Peek() (string, int64, error)
	// evict
	Evict() (string, int64, error)
}

type DependencyServiceInterface

type DependencyServiceInterface interface {
	SetState(state interface{})
	Start() error
	Ready() bool
	Stop() error
	Name() string
}

type LogicOperation

type LogicOperation int
const (
	Gte LogicOperation = iota
)

type ModelScalingStats

type ModelScalingStats interface {
	Inc(string, uint32) error
	IncDefault(string) error
	Dec(string, uint32) error
	DecDefault(string) error
	Reset(string) error
	Set(string, uint32) error
	Get(string) (uint32, error)
	GetAll(uint32, LogicOperation, bool) ([]*ModelStatsKV, error)
	Info() string
	Delete(string) error
	Add(string) error
}

type ModelStatsKV

type ModelStatsKV struct {
	Value     uint32
	Key       string
	ModelName string
}

Jump to

Keyboard shortcuts

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