client

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 13 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 NewClient

func NewClient(ctx context.Context, opt Options) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Del

func (c *Client) Del(ctx context.Context, key []byte) (bool, error)

func (*Client) DelInBatch

func (c *Client) DelInBatch(ctx context.Context, keys [][]byte, batchSize int64) (int64, error)

func (*Client) Exp

func (c *Client) Exp(ctx context.Context, key []byte, ttl time.Duration) (bool, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, key []byte) ([]byte, error)

func (*Client) Put

func (c *Client) Put(ctx context.Context, key []byte, value []byte, ttl time.Duration) (bool, error)

func (*Client) PutInBatch

func (c *Client) PutInBatch(ctx context.Context, rs []*riverpb.Record, batchSize int64) (int64, error)

func (*Client) Range

func (c *Client) Range(ctx context.Context, option *riverpb.RangeOption) ([]riverdb.Key, error)

func (*Client) Stat

func (c *Client) Stat(ctx context.Context) (*riverdb.Stats, error)

func (*Client) TTL

func (c *Client) TTL(ctx context.Context, key []byte) (time.Duration, error)

type Options

type Options struct {
	Target   string
	Password string

	TlsCert   string
	TlsDomain string
}

Jump to

Keyboard shortcuts

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