dicedb

package module
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: BSD-3-Clause Imports: 11 Imported by: 7

README

dicedb-go

Go client for DiceDB.

Installations

$ go get github.com/dicedb/dicedb-go@v1.0.9

Get Started

To start using DiceDB with Golang, you can follow the example tutorials present in the dice/examples directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteVoid added in v1.0.7

func ExecuteVoid(r *Retrier, retryOn []wire.ErrKind, op func() *wire.WireError, beforeRetry func() *wire.WireError) *wire.WireError

func ExecuteWithResult added in v1.0.7

func ExecuteWithResult[T any](r *Retrier, retryOn []wire.ErrKind, op func() (*T, *wire.WireError), beforeRetry func() *wire.WireError) (*T, *wire.WireError)

func WithID added in v1.0.2

func WithID(id string) option

Types

type Client

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

func NewClient

func NewClient(host string, port int, opts ...option) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Fire added in v1.0.2

func (c *Client) Fire(cmd *wire.Command) *wire.Result

func (*Client) FireString added in v1.0.2

func (c *Client) FireString(cmdStr string) *wire.Result

func (*Client) WatchCh added in v1.0.2

func (c *Client) WatchCh() (<-chan *wire.Result, error)

type ClientWire added in v1.0.7

type ClientWire struct {
	*internal.ProtobufTCPWire
}

func NewClientWire added in v1.0.7

func NewClientWire(maxMsgSize int, host string, port int) (*ClientWire, *wire.WireError)

func (*ClientWire) Close added in v1.0.7

func (cw *ClientWire) Close()

func (*ClientWire) Receive added in v1.0.7

func (cw *ClientWire) Receive() (*wire.Result, *wire.WireError)

func (*ClientWire) Send added in v1.0.7

func (cw *ClientWire) Send(cmd *wire.Command) *wire.WireError

type Retrier added in v1.0.7

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

func NewRetrier added in v1.0.7

func NewRetrier(maxRetries int, retryWindow time.Duration) *Retrier

func (*Retrier) Allow added in v1.0.7

func (r *Retrier) Allow() bool

func (*Retrier) Failure added in v1.0.7

func (r *Retrier) Failure()

func (*Retrier) Success added in v1.0.7

func (r *Retrier) Success()

type ServerWire added in v1.0.7

type ServerWire struct {
	*internal.ProtobufTCPWire
}

func NewServerWire added in v1.0.7

func NewServerWire(maxMsgSize int, keepAlive int32, clientFD int) (*ServerWire, *wire.WireError)

func (*ServerWire) Close added in v1.0.7

func (sw *ServerWire) Close()

func (*ServerWire) Receive added in v1.0.7

func (sw *ServerWire) Receive() (*wire.Command, *wire.WireError)

func (*ServerWire) Send added in v1.0.7

func (sw *ServerWire) Send(ctx context.Context, resp *wire.Result) *wire.WireError

Directories

Path Synopsis
examples
example_ping command
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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