kv_client

package
v0.0.0-...-e532b39 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteFailedErr = errors.New("delete failed")
View Source
var NotConnectedErr = errors.New("client not connected to server")
View Source
var PutFailedErr = errors.New("put key value failed")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conf Config) *Client

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) Delete

func (c *Client) Delete(key string) error

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

func (*Client) Put

func (c *Client) Put(key string, value []byte) error

type Config

type Config struct {
	Timeout       time.Duration
	ServerAddress string
}

Jump to

Keyboard shortcuts

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