Help us shape the future of Go! Take the 2026 Go Developer Survey

bloomd

package module
v0.0.0-...-d6ca7bd Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLUSH           = "flush"
	LIST            = "list"
	CREATE          = "create %s"
	CREATE_CAPACITY = "%s capacity=%d"
	CREATE_PROB     = "%s prob=%f"
	CREATE_INMEM    = "%s in_memory=1"
	DROP            = "drop %s"
	CLOSE           = "close %s"
	CLEAR           = "clear %s"
	MULTI           = "m"
	BULK            = "b"
	SET             = "s %s %s"
	INFO            = "info %s"

	RESPONSE_DONE   = "Done"
	RESPONSE_EXISTS = "Exists"
	RESPONSE_YES    = "Yes"
	RESPONSE_NO     = "No"
	RESPONSE_START  = "START"
	RESPONSE_END    = "END"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Check(context.Context, Filter, string) (bool, error)
	Clear(context.Context, Filter) error
	Close(context.Context, Filter) error
	Create(context.Context, Filter) error
	Drop(context.Context, Filter) error
	Flush(context.Context) error
	List(context.Context) (map[string]string, error)
	MultiCheck(context.Context, Filter, ...string) ([]bool, error)
	MultiSet(context.Context, Filter, ...string) ([]bool, error)
	Set(context.Context, Filter, string) (bool, error)
	Info(context.Context, Filter) (map[string]string, error)
	Shutdown()
	Ping() error
}

func NewClient

func NewClient(hostname string, hashKeys bool, timeout time.Duration) (Client, error)

func NewPooledClient

func NewPooledClient(hostname string, hashKeys bool, timeout time.Duration, initConns, maxConns int) (Client, error)

type Filter

type Filter string

type Pool

type Pool interface {
	Get() (net.Conn, error)
	Close()
	Len() int
}

Jump to

Keyboard shortcuts

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