Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evicted ¶
type Evicted[K comparable, V any] struct { Key K Value V }
type FIFO ¶
type FIFO[K comparable, V any] struct { // contains filtered or unexported fields }
Example ¶
package main
import (
"fmt"
"github.com/floatdrop/fifo"
)
func main() {
queue := fifo.New[string, int](256)
queue.Push("Hello", 5)
if e := queue.Get("Hello"); e != nil {
fmt.Println(*e)
}
}
Output: 5
Click to show internal directories.
Click to hide internal directories.