client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIVersion

type APIVersion int32
const (
	APIVersion1 APIVersion = iota
	APIVersion1TTL
	APIVersion2
)

type Client

type Client interface {
	Put(ctx context.Context, key, value []byte) error
	Get(ctx context.Context, key []byte) ([]byte, error)
	Delete(ctx context.Context, key []byte) error
	TTL(ctx context.Context, key []byte) (uint64, error)
	Scan(ctx context.Context, start []byte, limit int) ([]Entry, error)
	Close(ctx context.Context) error
}

func New

func New(addrs []string, mode Mode, apiVersion APIVersion, keySpace string) (Client, error)

type Entry added in v0.0.2

type Entry struct {
	K, V []byte
}

func (Entry) Key added in v0.0.2

func (e Entry) Key() string

func (Entry) Value added in v0.0.2

func (e Entry) Value() string

type Mode

type Mode string
const (
	ModeTxn Mode = "txn"
	ModeRaw Mode = "raw"
)

Jump to

Keyboard shortcuts

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