Categorygithub.com/go-yaaf/yaaf-common-redis
module
1.2.47
Repository: https://github.com/go-yaaf/yaaf-common-redis.git
Documentation: pkg.go.dev

# README

GO-YAAF Redis Middleware

Project status Build Coverage Status Go Report Card GoDoc License

This library contains Redis based implementation of the following middleware interfaces:

  • The messaging patterns defined by the IMessageBus interface of the yaaf-common library.
  • Distributed data cache defined by the IDataCache interface of the yaaf-common library.

Installation

Use go get.

go get -v -t github.com/go-yaaf/yaaf-common-redis

Then import the validator package into your own code.

import "github.com/go-yaaf/yaaf-common-redis"

Usage

Use Redis wrapper using a connection string:

  • redis://host:port/12
  • redis://host:port/db_number

db_number must be in the range of 0 - 15, the default is 0

import (
    "fmt"
    "time"

    . "github.com/go-yaaf/yaaf-common-redis/redis"
    . "github.com/go-yaaf/yaaf-common/database"
)

func main() {
    uri := "redis://localhost:6379/12"
    dc, err := NewRedisDataCache(uri)
    if err != nil {
        panic(any(err))
    }
	
	dc.Ping(5, 5)
	
}

# Packages

No description provided by the author
No description provided by the author