queue

package
v0.4.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrZeroValueNotSupported = errors.New("zero value not supported")
)

Functions

This section is empty.

Types

type SLOQueue

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

func NewSLOQueue

func NewSLOQueue(provider types.RouterProviderFunc, modelName string) (router *SLOQueue, err error)

func (*SLOQueue) Dequeue

func (q *SLOQueue) Dequeue(ts time.Time) (*types.RoutingContext, error)

func (*SLOQueue) Enqueue

func (q *SLOQueue) Enqueue(ctx *types.RoutingContext, currentTime time.Time) error

func (*SLOQueue) LastError

func (q *SLOQueue) LastError() error

func (*SLOQueue) Len

func (q *SLOQueue) Len() (total int)

func (*SLOQueue) Peek

func (q *SLOQueue) Peek(currentTime time.Time, pods types.PodList) (*types.RoutingContext, error)

func (*SLOQueue) Route

func (q *SLOQueue) Route(ctx *types.RoutingContext, pods types.PodList) (string, error)

type SimpleQueue

type SimpleQueue[V comparable] struct {
	// contains filtered or unexported fields
}

func NewSimpleQueue

func NewSimpleQueue[V comparable](initialCapacity int) *SimpleQueue[V]

func (*SimpleQueue[V]) Cap

func (q *SimpleQueue[V]) Cap() int

func (*SimpleQueue[V]) Dequeue

func (q *SimpleQueue[V]) Dequeue(_ time.Time) (c V, err error)

func (*SimpleQueue[V]) Enqueue

func (q *SimpleQueue[V]) Enqueue(value V, _ time.Time) error

func (*SimpleQueue[V]) Len

func (q *SimpleQueue[V]) Len() int

func (*SimpleQueue[V]) Peek

func (q *SimpleQueue[V]) Peek(_ time.Time, _ types.PodList) (c V, err error)

Jump to

Keyboard shortcuts

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