goredisbloom

package module
v0.0.0-...-0b705f4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 2 Imported by: 0

README

go-redisbloom

golang client for redisbloom

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client redis bloom client

func NewClient

func NewClient(addr, passwd string, db int) *Client

NewClient new client

func (*Client) BFAdd

func (c *Client) BFAdd(key, item string) int

BFAdd Adds an item to the Bloom Filter, creating the filter if it does not yet exist.

func (*Client) BFCreate

func (c *Client) BFCreate(key string, errorRate float64, capacity int) string

BFCreate Creates an empty Bloom Filter with a given desired error ratio and initial capacity.

func (*Client) BFExists

func (c *Client) BFExists(key, item string) int

BFExists Determines whether an item may exist in the Bloom Filter or not.

func (*Client) BFMAdd

func (c *Client) BFMAdd(key string, items ...string) []int

BFMAdd Adds one or more items to the Bloom Filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD except it allows multiple inputs and returns multiple values.

func (*Client) BFMExists

func (c *Client) BFMExists(key string, items ...string) []int

BFMExists Determines if one or more items may exist in the filter or not.

func (*Client) SetClient

func (c *Client) SetClient(client *redis.Client)

SetClient set redis client with redis client

type RedisParamsArray

type RedisParamsArray []string

RedisParamsArray .

func (RedisParamsArray) MarshalBinary

func (s RedisParamsArray) MarshalBinary() ([]byte, error)

MarshalBinary implement encoding.BinaryMarshaler

func (RedisParamsArray) UnmarshalBinary

func (s RedisParamsArray) UnmarshalBinary(data []byte) error

UnmarshalBinary implement encoding.BinaryUnmarshaler

Jump to

Keyboard shortcuts

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