conn

package
v0.0.0-...-a8d0dae Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

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
}

func NewClient

func NewClient(redisURL, redisPassword string, db int, log log.Logger) (client *Client, err error)

func (Client) Close

func (c Client) Close() error

Close close redis connect to server

func (Client) DepthPub

func (c Client) DepthPub(key, val string) (err error)

DepthPub push data to depth topic

func (Client) Get

func (c Client) Get(key string) (val string, err error)

Get get data from redis

func (Client) HGetAll

func (c Client) HGetAll(key string) (vals map[string]string, err error)

HGetAll

func (Client) MGet

func (c Client) MGet(keys []string) (vals []interface{}, err error)

MGet get data from redis, many keys once

func (Client) PrivatePub

func (c Client) PrivatePub(key, val string) (err error)

PrivatePub push data to private topic

func (Client) PublicPub

func (c Client) PublicPub(key, val string) (err error)

PublicPub push data to public topic

func (Client) Set

func (c Client) Set(key, val string) (err error)

Set push data to redis, only used by public channel

Jump to

Keyboard shortcuts

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