set

package
v0.0.0-...-1ed73fc Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SliceSet

type SliceSet struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SliceSet implements an safe slice backed set

func NewSliceSet

func NewSliceSet() SliceSet

NewSliceSet creates a new SliceSet

func (*SliceSet) Add

func (set *SliceSet) Add(e string) (bool, error)

Add a single element to the set, return true if newly added

func (*SliceSet) Cardinality

func (set *SliceSet) Cardinality() (int, error)

Cardinality returns the number of elements in the set

func (*SliceSet) Close

func (set *SliceSet) Close() error

Close the underlying connection to the datastore

func (*SliceSet) Contains

func (set *SliceSet) Contains(e string) (bool, error)

Contains returns true if the given item is in the set

type UnsafeSliceSet

type UnsafeSliceSet struct {
	// contains filtered or unexported fields
}

UnsafeSliceSet implements an unsafe slice backed set

func NewUnsafeSliceSet

func NewUnsafeSliceSet() UnsafeSliceSet

NewUnsafeSliceSet creates a new UnsafeSliceSet

func (*UnsafeSliceSet) Add

func (set *UnsafeSliceSet) Add(e string) (bool, error)

Add a single element to the set, return true if newly added

func (*UnsafeSliceSet) Cardinality

func (set *UnsafeSliceSet) Cardinality() (int, error)

Cardinality returns the number of elements in the set

func (*UnsafeSliceSet) Close

func (set *UnsafeSliceSet) Close() error

Close the underlying connection to the datastore

func (*UnsafeSliceSet) Contains

func (set *UnsafeSliceSet) Contains(e string) (bool, error)

Contains returns true if the given item is in the set

Jump to

Keyboard shortcuts

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