set

package
v0.0.0-...-9cb517b Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set interface {
	// Base returns the base Type.
	Base() redistypes.Type

	// Add implements the Redis command SADD. It adds one or more values to a set
	// and returns the number of values added to the set, not including the ones
	// that already existed.
	//
	// See https://redis.io/commands/sadd.
	Add(values ...interface{}) (uint64, error)

	// Card implements the Redis command SCARD. It returns the cardinality of the
	// set, or 0 if the set doesn't exist.
	//
	// See https://redis.io/commands/scard.
	Card() (uint64, error)
}

Set is a Redis implementation of a set.

func NewRedisSet

func NewRedisSet(conn redis.Conn, name string) Set

NewRedisSet creates a Redis implementation of Set given redigo connection conn and name. The Redis key used to identify the Set will be name.

Jump to

Keyboard shortcuts

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