client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 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)
	Close(ctx context.Context) error
}

func New

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

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