collection

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRedisClient

func CreateRedisClient(id string) (*redis.Client, error)

Types

type BinSet

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

func NewBinSet

func NewBinSet(rdb *redis.Client, key string) *BinSet

func (*BinSet) SetTo

func (b *BinSet) SetTo(set int64, state int)

func (*BinSet) Test

func (b *BinSet) Test(set int64) bool

type BloomFilter

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

func NewBloomFilter

func NewBloomFilter(rdb *redis.Client, key string, size uint, hashCount uint) *BloomFilter

func (*BloomFilter) Add

func (bf *BloomFilter) Add(value string)

func (*BloomFilter) Lookup

func (bf *BloomFilter) Lookup(value string) bool

type LinkedList

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

func NewLinkedList

func NewLinkedList() *LinkedList

func (*LinkedList) Append

func (l *LinkedList) Append(value interface{}) *LinkedListNode

func (*LinkedList) Iterate

func (l *LinkedList) Iterate() chan *LinkedListNode

func (*LinkedList) Remove

func (l *LinkedList) Remove(n *LinkedListNode) bool

type LinkedListNode

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

func (*LinkedListNode) Value

func (n *LinkedListNode) Value() interface{}

type OrderedDict

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

func NewOrderedDict

func NewOrderedDict() *OrderedDict

func (*OrderedDict) Get

func (d *OrderedDict) Get(key string) interface{}

func (*OrderedDict) Iterate

func (d *OrderedDict) Iterate() chan interface{}

func (*OrderedDict) Remove

func (d *OrderedDict) Remove(key string) bool

func (*OrderedDict) Set

func (d *OrderedDict) Set(key string, value interface{})

type Tuple

type Tuple struct {
	Element1 interface{}
	Element2 interface{}
}

Tuple is the return type of Zip

func Zip

func Zip(slice1 interface{}, slice2 interface{}) []Tuple

Zip returns a list of tuples, where the i-th tuple contains the i-th element from each of the input iterables. The returned list is truncated in length to the length of the shortest input iterable.

Jump to

Keyboard shortcuts

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