client

package
v0.0.0-...-c835caf Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const EXIT = "exit"

EXIT CLI code

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents the client structure of blazedb

func New

func New(addr string) *Client

New instanciates a New client that connects to the given address

func (*Client) Delete

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

Delete deletes the given (key, value) pair matching the given key

func (*Client) Get

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

Get retrieves the value for the given key

func (*Client) Queryf

func (c *Client) Queryf(format string, a ...interface{}) ([]byte, error)

Queryf allows to send a raw command to the blazedb server It works exactly the same as Printf, Sprintf, Fprintf...

func (*Client) Set

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

Set put a new value for the given key (but if there already is a value an error is throwed, see Update to update a value)

func (*Client) StartCLI

func (c *Client) StartCLI()

StartCLI start the CLI loop printing a prompt line

func (*Client) Update

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

Update updates the given key value

Jump to

Keyboard shortcuts

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