insertStrategies

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InsertStrategyMap = map[InsertStrategy]PushPopStrategyActuator{
	FIFO: &fifo{},
}

Functions

This section is empty.

Types

type EmptyQueue

type EmptyQueue struct{}

func (*EmptyQueue) Error

func (m *EmptyQueue) Error() string

type FullQueue

type FullQueue struct{}

func (*FullQueue) Error

func (m *FullQueue) Error() string

type InsertStrategy

type InsertStrategy int
const (
	FIFO          InsertStrategy = iota
	LIFO          InsertStrategy = iota
	ThresholdSort InsertStrategy = iota
	QoSAware      InsertStrategy = iota
	Custom        InsertStrategy = iota
)

type PushPopStrategyActuator

type PushPopStrategyActuator interface {
	Push(el *element.Element, queue *[]*element.Element) error
	Pop(queue *[]*element.Element) (*element.Element, error)
	Delete(index int, queue *[]*element.Element) error
	New() PushPopStrategyActuator
}

func InsertStrategySelector

func InsertStrategySelector(s InsertStrategy) (PushPopStrategyActuator, error)

Jump to

Keyboard shortcuts

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