aerospike

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AerospikeConnector

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

func NewAerospikeConnector

func NewAerospikeConnector(aHosts []AerospikeHost) (*AerospikeConnector, error)

return new Aerospike connector

func NewAerospikeConnectorWithClientPolicy

func NewAerospikeConnectorWithClientPolicy(aHosts []AerospikeHost, policy *as.ClientPolicy) (*AerospikeConnector, error)

func (*AerospikeConnector) AnyKeyExists

func (conn *AerospikeConnector) AnyKeyExists(namespace, set string, keys []interface{}) (bool, error)

check where any of the provided key is exists or not

func (*AerospikeConnector) Close

func (conn *AerospikeConnector) Close()

close the Aerospike client connection

func (*AerospikeConnector) DeleteKey

func (conn *AerospikeConnector) DeleteKey(namespace, set string, key interface{}) error

delete the key

func (*AerospikeConnector) GetAutomicCounter

func (conn *AerospikeConnector) GetAutomicCounter(namespace, set string, key interface{}, value int, expiryInSec uint32) (int, error)

GetAutomicCounter return automic counter for given key by increment with given value

func (*AerospikeConnector) GetKey

func (conn *AerospikeConnector) GetKey(namespace, set string, key interface{}, binNames []string) (map[string]interface{}, error)

return the value of given key

func (*AerospikeConnector) GetObjectByKey

func (conn *AerospikeConnector) GetObjectByKey(namespace, set string, key, object interface{}) error

GetObjectByKey return object for given keys

func (*AerospikeConnector) PutKey

func (conn *AerospikeConnector) PutKey(namespace, set string, key interface{}, expiryInSec uint32) error

expiryInSec value will be 0 : use namespace level ttl MaxUint32 : never expire MaxUint32 - 1 : do not update ttl incase of update record > 0 : Actual expiration in seconds

func (*AerospikeConnector) PutKeyValues

func (conn *AerospikeConnector) PutKeyValues(namespace, set string, key interface{}, values map[string]interface{}, expiryInSec uint32) error

expiryInSec value will be 0 : use namespace level ttl MaxUint32 : never expire MaxUint32 - 1 : do not update ttl incase of update record > 0 : Actual expiration in seconds

func (*AerospikeConnector) PutKeyWithObject

func (conn *AerospikeConnector) PutKeyWithObject(namespace, set string, key interface{}, object interface{}, expiryInSec uint32) error

PutKeyWithObject store the key with object

type AerospikeHost

type AerospikeHost struct {
	Name string
	Port int
}

Jump to

Keyboard shortcuts

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