redis

package
v0.0.0-...-d36ff20 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 8 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 (*Client) Get

func (p *Client) Get(ctx context.Context, key string, handler HandlerFunc, value interface{}, ttl time.Duration) error

func (*Client) Get_

func (p *Client) Get_(ctx context.Context, key string, value interface{}) error

func (*Client) Heartbeat

func (p *Client) Heartbeat(ctx context.Context) ([]string, error)

func (*Client) Set

func (p *Client) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error

type Cluster

type Cluster struct {
	Namespace string `toml:"namespace"`
	Nodes     []Node `toml:"nodes"`
}

func (*Cluster) Addrs

func (p *Cluster) Addrs() []string

func (*Cluster) Open

func (p *Cluster) Open() (*Client, error)

func (*Cluster) Options

func (p *Cluster) Options() redis_.ClusterOptions

type HandlerFunc

type HandlerFunc func(value interface{}) error

type Node

type Node struct {
	Host string `toml:"host"`
	Port uint16 `toml:"port"`
}

Jump to

Keyboard shortcuts

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