redconcli

package
v0.0.0-...-642df0c Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: BSD-3-Clause, Unlicense Imports: 10 Imported by: 0

README

Minimalist Redis Client [ modified by unixman, distributed as part of unix-world/SmartGO ]

(c) 2023-2024 unix-world.org

This package is provided for having a minimalist redis client for tidwall/redcon and is based on: github.com/mauricio/redis-client (c) 2022 github.com/mauricio

For a full featured redis client, see the following: github.com/gomodule/redigo github.com/redis/go-redis

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 Connect

func Connect(ctx context.Context, address string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Send

func (c *Client) Send(values []interface{}) (*Result, error)

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Read

func (r *Reader) Read() (*Result, error)

type Result

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

func (*Result) Content

func (r *Result) Content() interface{}

func (*Result) Err

func (r *Result) Err() error

func (*Result) Int64

func (r *Result) Int64() (int64, error)

func (*Result) Slice

func (r *Result) Slice() ([]interface{}, error)

func (*Result) String

func (r *Result) String() (string, bool, error)

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) WriteArray

func (w *Writer) WriteArray(values []interface{}) error

WriteArray writes an array that contains int8 to int64, strings, []byte, []interface{} or nil. Any other values inside the array will cause this method to return an error.

func (*Writer) WriteBulkString

func (w *Writer) WriteBulkString(value []byte) error

func (*Writer) WriteInt64

func (w *Writer) WriteInt64(v int64) error

func (*Writer) WriteNil

func (w *Writer) WriteNil() error

WriteNil writes a nil bulk string

Jump to

Keyboard shortcuts

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