ds

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespacedCache

type NamespacedCache interface {
	Len(namespace string) int
	Namespaces() []string
	Get(namespace string, key string) (interface{}, bool)
	Set(namespace string, key string, value interface{})
	Range(namespace string, f func(key string, value interface{}) bool)
	Delete(namespace string, key string)
	Exists(namespace string, key string) bool
	Clear(namespace string)
	Close()
}

func NewCache

func NewCache() NamespacedCache

type Queue

type Queue interface {
	Enqueue(val interface{})
	Dequeue() (interface{}, bool)
	IsEmpty() bool
	Len() int
	Range(fn func(element interface{}) bool)
}

func NewQueue

func NewQueue() Queue

type Stack

type Stack interface {
	Pop() (interface{}, bool)
	Push(f interface{})
	Range(fn func(element interface{}) bool)
	IsEmpty() bool
	Len() int
}

func NewStack

func NewStack() Stack

Jump to

Keyboard shortcuts

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