limitedset

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: ISC Imports: 2 Imported by: 0

Documentation

Overview

this is a limited size set

items may only be added or check for existance items are automatically removed on a first-in first-out basis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitedSet

type LimitedSet struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(n int) *LimitedSet

create a new limited set that holds up to 'n' items

func (*LimitedSet) Add

func (ls *LimitedSet) Add(item string)

add an item to the set

func (*LimitedSet) Exists

func (ls *LimitedSet) Exists(item string) bool

check to see if items is in the set

Jump to

Keyboard shortcuts

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