redis

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopLoop = errors.New("stop")

Functions

func ForeachSet

func ForeachSet(ctx context.Context, c *redis.Client, key string, cursor uint64, pageSize int64, f func(key, val string) error) (err error)

func NewRedisClient

func NewRedisClient(ctx context.Context, option *RedisOptions) (*redis.Client, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (Client) Marshal

func (r Client) Marshal() ([]byte, error)

func (Client) MarshalJSON

func (r Client) MarshalJSON() ([]byte, error)

func (*Client) Merge

func (r *Client) Merge(src proto.Message)

Merge implement proto.Merger

func (*Client) ProtoMessage

func (r *Client) ProtoMessage()

ProtoMessage implement proto.Message

func (*Client) Redis

func (r *Client) Redis(ctx context.Context) *redis.Client

func (*Client) Reset

func (r *Client) Reset()

Reset *implement proto.Message*

func (Client) String

func (r Client) String() string

String implement proto.Message

func (*Client) Unmarshal

func (r *Client) Unmarshal(data []byte) (err error)

func (*Client) UnmarshalJSON

func (r *Client) UnmarshalJSON(data []byte) (err error)

type Cmder

type Cmder struct {
	redis.Cmder
}

func (Cmder) String

func (c Cmder) String() string

type RedisOptions

type RedisOptions struct {
	Url                  string   `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RedisOptions) Descriptor

func (*RedisOptions) Descriptor() ([]byte, []int)

func (*RedisOptions) GetPeer

func (o *RedisOptions) GetPeer() (string, int)

func (*RedisOptions) GetUrl

func (m *RedisOptions) GetUrl() string

func (*RedisOptions) ProtoMessage

func (*RedisOptions) ProtoMessage()

func (*RedisOptions) Reset

func (m *RedisOptions) Reset()

func (*RedisOptions) String

func (m *RedisOptions) String() string

func (*RedisOptions) UnmarshalJSON

func (o *RedisOptions) UnmarshalJSON(data []byte) (err error)

func (*RedisOptions) XXX_DiscardUnknown

func (m *RedisOptions) XXX_DiscardUnknown()

func (*RedisOptions) XXX_Marshal

func (m *RedisOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RedisOptions) XXX_Merge

func (m *RedisOptions) XXX_Merge(src proto.Message)

func (*RedisOptions) XXX_Size

func (m *RedisOptions) XXX_Size() int

func (*RedisOptions) XXX_Unmarshal

func (m *RedisOptions) XXX_Unmarshal(b []byte) error

type Session

type Session struct {
	*redis.Client
}

Jump to

Keyboard shortcuts

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