capacityset

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendToChannel

func SendToChannel(f func() interface{}) <-chan interface{}

Types

type Set

type Set interface {
	// Adds an element to the set. Returns whether
	// the item was added.
	Add(item interface{}) bool

	// Pop returns an item from the set
	Pop() interface{}

	// Size returns the number of items in the set
	Size() int
}

Set is the interface of the common set storage pattern

func NewCapacitySet

func NewCapacitySet(capacity int) Set

NewCapacitySet returns the set interface with max capacity allowing of a set with cap

Jump to

Keyboard shortcuts

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