Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetFrom(ctx context.Context, key string, server int32) (string, error)
- func (c *Client) GetFromDB(ctx context.Context, key string) (string, error)
- func (c *Client) GetMany(ctx context.Context, keys []string) (map[string]string, error)
- func (c *Client) GetManyOpts(ctx context.Context, keys []Key) (map[string]string, error)
- func (c *Client) GetOne(ctx context.Context, key string) (string, error)
- func (c *Client) Index(ctx context.Context, name string) (*Index, error)
- func (c *Client) IsIndex(ctx context.Context, name string) (bool, error)
- func (c *Client) SetMany(ctx context.Context, keyValue map[string]string, uniques bool) error
- func (c *Client) SetManyOpts(ctx context.Context, keyValue map[string]Value, uniques bool) error
- func (c *Client) SetOne(ctx context.Context, key, value string, uniques bool) error
- func (c *Client) SetTo(ctx context.Context, key, value string, server int32, uniques bool) error
- func (c *Client) SetToAll(ctx context.Context, key, value string, uniques bool) error
- func (c *Client) SetToAllAndToDB(ctx context.Context, key, value string, uniques bool) error
- func (c *Client) SetToDB(ctx context.Context, key, value string, uniques bool) error
- type Index
- func (i *Index) Get(ctx context.Context, key string) (string, error)
- func (i *Index) GetIndex(ctx context.Context) (map[string]string, error)
- func (i *Index) GetName() string
- func (i *Index) Index(ctx context.Context, name string) (*Index, error)
- func (i *Index) Set(ctx context.Context, key, value string, uniques bool) (int32, error)
- type Key
- type Opts
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUniqueConstraint = errors.New("unique constraint failed")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(balancerIP string, credentials ...gcredentials.TransportCredentials) (*Client, error)
func (*Client) GetFromDB ¶ added in v0.1.2
GetFromDB gets the value by key from the physical database.
func (*Client) GetManyOpts ¶
GetManyOpts gets a lot of values from gRPCis with opts.
func (*Client) SetManyOpts ¶
SetManyOpts gets a lot of values from gRPCis with opts.
func (*Client) SetToAllAndToDB ¶ added in v0.1.2
SetToAllAndToDB sets the value for the key on all servers and in th physical database.
type Index ¶ added in v0.2.1
type Index struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.