cluster

package
v0.0.0-...-7d76071 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_SIZE = 1024

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(poolSize int, ip, port string) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) ConnectAll

func (c *Client) ConnectAll()

func (*Client) Del

func (c *Client) Del(k string) error

func (*Client) GeoAdd

func (c *Client) GeoAdd(key string, lon, lat float64, item string)

func (*Client) GeoSearch

func (c *Client) GeoSearch(key string, lon, lat float64, radius int) (int, []string)

func (*Client) Get

func (c *Client) Get(k string) string

func (*Client) GetWithError

func (c *Client) GetWithError(k string) (string, error)

func (*Client) Info

func (c *Client) Info() string

func (*Client) Nodes

func (c *Client) Nodes() []string

func (*Client) PlaceBackInPool

func (c *Client) PlaceBackInPool(cc *ClientConnection)

func (*Client) SAdd

func (c *Client) SAdd(k, v string) error

func (*Client) SMembers

func (c *Client) SMembers(k string) string

func (*Client) SRem

func (c *Client) SRem(k, v string) error

func (*Client) Scan

func (c *Client) Scan(cursor int, target string) (int, []string)

func (*Client) Set

func (c *Client) Set(k, v string) error

func (*Client) TakeFromPool

func (c *Client) TakeFromPool() *ClientConnection

func (*Client) ZAdd

func (c *Client) ZAdd(k string, score int, v string) error

func (*Client) ZRange

func (c *Client) ZRange(k string) string

type ClientConnection

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

func (*ClientConnection) Connect

func (c *ClientConnection) Connect(target string) bool

func (*ClientConnection) Info

func (c *ClientConnection) Info() string

func (*ClientConnection) ReadExactly

func (c *ClientConnection) ReadExactly(size int) (string, error)

func (*ClientConnection) ReadFirst

func (c *ClientConnection) ReadFirst() (string, error)

func (*ClientConnection) ReadInfoAll

func (c *ClientConnection) ReadInfoAll() string

func (*ClientConnection) ReadLines

func (c *ClientConnection) ReadLines(size int) (string, error)

func (*ClientConnection) ReadMembers

func (c *ClientConnection) ReadMembers(first string, passedTotal int) (string, error)

func (*ClientConnection) ReadScan

func (c *ClientConnection) ReadScan(first string) (string, string, error)

func (*ClientConnection) ReadToLimit

func (c *ClientConnection) ReadToLimit(first string) (string, error)

func (*ClientConnection) RunCommand

func (c *ClientConnection) RunCommand(command string) (string, bool, error)

func (*ClientConnection) TryCommand

func (c *ClientConnection) TryCommand(command string) error

func (*ClientConnection) TryCommandWithReply

func (c *ClientConnection) TryCommandWithReply(command string) string

func (*ClientConnection) TryCommandWithReplyAndError

func (c *ClientConnection) TryCommandWithReplyAndError(command string) (string, error)

Jump to

Keyboard shortcuts

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