container

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package container provides some goroutine-unsafe containers and some goroutine-safe containers (under the container/concurrent folder).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator interface {
	// IsValid returns true if the iterator is valid for use, false otherwise.
	// We must not call Next, Key, or Value if IsValid returns false.
	IsValid() bool
	// Next advances the iterator to the next element of the map
	Next()
	// Value returns the value of the underlying element
	Value() interface{}
}

Iterator is an interface for iterators of any container type.

type MapIterator

type MapIterator interface {
	Iterator
	// Key returns the key of the underlying element
	Key() interface{}
}

MapIterator is a common interface for iterators of maps.

Directories

Path Synopsis
concurrent
lru
Package lru provides a goroutine safe LRU cache implementation based on "github.com/golang/groupcache/lru".
Package lru provides a goroutine safe LRU cache implementation based on "github.com/golang/groupcache/lru".
pool
Package pool provides some goroutine-safe object pools such as ObjectPool.
Package pool provides some goroutine-safe object pools such as ObjectPool.
queue
Package queue offers goroutine-safe Queue implementations such as LockfreeQueue(Lock free queue).
Package queue offers goroutine-safe Queue implementations such as LockfreeQueue(Lock free queue).
Package list implements a doubly linked list.
Package list implements a doubly linked list.
Package lomap implements a linked ordered map which supports iteration in insertion order.
Package lomap implements a linked ordered map which supports iteration in insertion order.
Package loset implements a linked ordered set which supports iteration in insertion order.
Package loset implements a linked ordered set which supports iteration in insertion order.

Jump to

Keyboard shortcuts

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