aero

package module
v0.0.0-...-6d9a4d3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	STRING      = aerospike.STRING
	NUMERIC     = aerospike.NUMERIC
	CREATE_ONLY = aerospike.CREATE_ONLY
	WRITE       = aerospike.WRITE
	LOW         = aerospike.LOW
	MEDIUM      = aerospike.MEDIUM
	HIGHT       = aerospike.HIGH
)

Variables

View Source
var (
	ErrKeyExist    = errors2.NewBadReq("Key already exists")
	ErrIndexExist  = errors2.NewBadReq("Index already exists")
	ErrKeyNotExist = errors2.NewBadReq("Key is not exists")
	ErrNotFound    = errors2.NewNotFound("not found")
)

Functions

func MarshalMsgPack

func MarshalMsgPack(v msgp.Marshaler) ([]byte, error)

func NewArrayKeys

func NewArrayKeys(size int) []*aerospike.Key

func NewBin

func NewBin(name string, val interface{}) *aerospike.Bin

func NewEqualFilter

func NewEqualFilter(binName string, value interface{}) *aerospike.Filter

func NewKey

func NewKey(ns, set string, key interface{}) *aerospike.Key

func NewKeys

func NewKeys(ns, set string, key ...string) []*aerospike.Key

func NewPolicy

func NewPolicy() *aerospike.BasePolicy

func NewQueryPolicy

func NewQueryPolicy() *aerospike.QueryPolicy

func NewRangeFilter

func NewRangeFilter(binName string, begin int64, end int64) *aerospike.Filter

func NewScanPolicy

func NewScanPolicy() *aerospike.ScanPolicy

func NewStatement

func NewStatement(ns, set string, binNames ...string) *aerospike.Statement

func NewWritePolicy

func NewWritePolicy(generation, expiration int32) *aerospike.WritePolicy

func UnmarshalMsgPack

func UnmarshalMsgPack(data []byte, v msgp.Unmarshaler) error

Types

type Client

type Client struct {
	*aerospike.Client
}

func NewClient

func NewClient(hostname string, port int) *Client

func (*Client) BatchGet

func (c *Client) BatchGet(policy *aerospike.BasePolicy, keys []*aerospike.Key, binNames ...string) ([]*aerospike.Record, error)

func (*Client) CreateIndex

func (c *Client) CreateIndex(
	policy *aerospike.WritePolicy,
	namespace string,
	setName string,
	indexName string,
	binName string,
	indexType aerospike.IndexType,
) (*aerospike.IndexTask, error)

func (*Client) Delete

func (c *Client) Delete(policy *aerospike.WritePolicy, ns, set string, key interface{}) error

func (*Client) Exists

func (c *Client) Exists(policy *aerospike.BasePolicy, ns, set string, key interface{}) (bool, error)

func (*Client) Get

func (c *Client) Get(policy *aerospike.BasePolicy, ns, set string, key interface{}, binNames ...string) (*aerospike.Record, error)

func (*Client) PutBins

func (c *Client) PutBins(policy *aerospike.WritePolicy, ns, set string, key interface{}, bin ...*aerospike.Bin) error

func (*Client) Query

func (c *Client) Query(policy *aerospike.QueryPolicy, statement *aerospike.Statement) (*aerospike.Recordset, error)

Jump to

Keyboard shortcuts

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