dstash

package
v0.0.0-...-7fd4116 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Deadline int = 60
	Deadline time.Duration = time.Duration(60)
)

Functions

func ToBytes

func ToBytes(v interface{}) []byte

func ToString

func ToString(v interface{}) string

func UnmarshalValue

func UnmarshalValue(kind reflect.Kind, buf []byte) interface{}

Types

type Client

type Client struct {
	ServiceName        string
	Quorum             int
	Replicas           int
	ConsulAgentAddr    string
	ServicePort        int
	ServerHostOverride string
	// contains filtered or unexported fields
}

func NewDefaultClient

func NewDefaultClient() *Client

func (*Client) BatchIndex

func (c *Client) BatchIndex(batch map[string]struct{}) error

func (*Client) BatchLookup

func (c *Client) BatchLookup(batch map[interface{}]interface{}) (map[interface{}]interface{}, error)

func (*Client) BatchPut

func (c *Client) BatchPut(batch map[interface{}]interface{}) error

func (*Client) Connect

func (m *Client) Connect() (err error)

func (*Client) Disconnect

func (c *Client) Disconnect() error

func (*Client) Index

func (c *Client) Index(str string) error

func (*Client) Items

func (c *Client) Items(keyType, valueType reflect.Kind) (map[interface{}]interface{}, error)

func (*Client) Lookup

func (c *Client) Lookup(key interface{}, valueType reflect.Kind) (interface{}, error)

func (*Client) Put

func (c *Client) Put(k interface{}, v interface{}) error

func (*Client) Search

func (c *Client) Search(searchTerms string) (map[uint64]struct{}, error)

Jump to

Keyboard shortcuts

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