MCPcopy
hub / github.com/redis/go-redis / BFAdd

Method BFAdd

probabilistic.go:168–173  ·  view source on GitHub ↗

BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/

(ctx context.Context, key string, element interface{})

Source from the content-addressed store, hash-verified

166// BFAdd adds an item to a Bloom filter.
167// For more information - https://redis.io/commands/bf.add/
168func (c cmdable) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd {
169 args := []interface{}{"BF.ADD", key, element}
170 cmd := NewBoolCmd(ctx, args...)
171 _ = c(ctx, cmd)
172 return cmd
173}
174
175// BFCard returns the cardinality of a Bloom filter -
176// number of items that were added to a Bloom filter and detected as unique

Callers

nothing calls this directly

Calls 1

NewBoolCmdFunction · 0.85

Tested by

no test coverage detected