English | 简体中文
A client packaged based on go-redis that operates Tair For Redis Modules.
- TairString, is a string that contains s version number.(Open sourced)
- TairHash, is a hash that allows you to specify the expiration time and version number of a field.(Open sourced)
- TairZset, allows you to sort data of the double type based on multiple dimensions. (Open sourced)
- TairBloom, is a Bloom filter that supports dynamic scaling.
- TairRoaring, is a more efficient and balanced type of compressed bitmaps recognized by the industry.
- TairSearch, is a full-text search module developed in-house based on Redis modules.
- TairDoc, to perform create, read, update, and delete (CRUD) operations on JSON data.
- TairGis, allowing you to query points, linestrings, and polygons. (Open Sourced)
- TairTs, is a time series data structure that is developed on top of Redis modules.
- TairCpc, is a data structure developed based on the compressed probability counting (CPC) sketch.
- TairVector, is a vector that allows you to find similar data points in a high-dimensional vector space.
go get github.com/alibaba/tair-go
An example of TairString is as follows:
go.mod
require (
github.com/alibaba/tair-go vx.x.x
)
test.go
import (
"context"
"fmt"
"github.com/redis/go-redis/v9"
"github.com/alibaba/tair-go/tair"
)
var ctx = context.Background()
var tairClient *tair.TairClient
func init() {
tairClient = tair.NewTairClient(&redis.Options{
Addr: "xxx.redis.rds.aliyuncs.com:6379",
Password: "xxx",
DB: 0,
})
}
func main() {
err := tairClient.ExSet(ctx, "exkey", "exval").Err()
if err != nil {
fmt.Println(err.Error())
}
val, err := tairClient.ExGet(ctx, "exkey").Result()
if err != nil {
panic(err)
}
fmt.Println("get exkey values is: ", val)
}