xredis

package module
v1.0.1-0...-a84aae9 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

README

xredis

简介

基础功能

xredis是基于go-redis 的组件

新特性

在go-redis的基础上我们加入了一些新的特性

  • 统一配置入口, 只需在conf/下的ini文件中增加section
  • 业务开发时,考虑到大家可能会经常用到多实例部署的情况,我们提供了几种常用的分片方案,当然如果默认的分片机制不符合大家的场景时,也可以通过自定义分片插件的方式 来实现个性化的需求
  • 命令执行错误时会自动上报,便于相关监控关联起来
  • 增加基于协程池的命令异步执行方案
文档

[开发文档]

Documentation

Overview

=============================================================== * Copyright (C) 2020 All rights reserved. * * FileName:xredis.go * Author:WuGuoFu * Date: 2020-03-19 * Description: * ================================================================

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRedis

func AddRedis(key, addr string, options redis.Options)

AddRedis can set redis option without reading config file

func GetClient

func GetClient(key string) *redis.Client

GetClient return the client of the original reference package "go-redis".

func NewShardingXesRedis

func NewShardingXesRedis(ctx context.Context, cluster string) *core.XesRedis

NewShardingXesRedis returns a client to the Redis Server specified by cluster Name.

func NewSimpleXesRedis

func NewSimpleXesRedis(ctx context.Context, instance string) *core.XesRedis

NewSimpleXesRedis returns a client to the Redis Server specified by instance.

func NewXesRedis

func NewXesRedis() *core.XesRedis

NewXesRedis returns a client to the Redis Server specified by default options.

func NewXesRedisOfCtx

func NewXesRedisOfCtx(ctx context.Context) *core.XesRedis

NewXesRedisOfCtx returns a client to the Redis Server that you can Specify handler.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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