aerospike

package
v0.0.0-...-41b1600 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	V1RecordLevel = "1"
)

Variables

This section is empty.

Functions

func GetVersion

func GetVersion(logger *logrus.Logger, aeroRecord aerospike.BinMap) string

GetVersion - returns version as a string. Empty if version not found.

Types

type ASClient

type ASClient struct {
	Logger           *logrus.Logger
	Client           *aerospike.Client
	WritePolicy      *aerospike.WritePolicy
	ReadPolicy       *aerospike.BasePolicy
	AccountNamespace config.AerospikeNamespace
}

func New

func New(logger *logrus.Logger, conf config.AerospikeCfg) (*ASClient, error)

New - Returns ASClinet built from config

func (*ASClient) GetReader

func (a *ASClient) GetReader() DbReader

func (*ASClient) GetWriter

func (a *ASClient) GetWriter() DbWriter

type AerospikeClient

type AerospikeClient interface {
	GetWriter() DbWriter
	GetReader() DbReader
}

type AerospikeReader

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

func (*AerospikeReader) KeyExists

func (a *AerospikeReader) KeyExists(keyStr string) (bool, *aerospike.Key, error)

KeyExists - Returns true if key exists, with aerospike key and any error that occurs

func (*AerospikeReader) ReadRecord

func (a *AerospikeReader) ReadRecord(key *aerospike.Key) (record.Record, error)

type AerospikeWriter

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

func (*AerospikeWriter) WriteRecord

func (a *AerospikeWriter) WriteRecord(key string, record record.Record) error

Writes record with specified key in the account namespace under the account set. Returns error if one is found

func (*AerospikeWriter) WriteRecordWithASKey

func (a *AerospikeWriter) WriteRecordWithASKey(asKey *aerospike.Key, record record.Record) error

type DbReader

type DbReader interface {
	ReadRecord(key *aerospike.Key) (record.Record, error)
	KeyExists(key string) (bool, *aerospike.Key, error)
}

type DbWriter

type DbWriter interface {
	WriteRecord(key string, record record.Record) error
	WriteRecordWithASKey(key *aerospike.Key, record record.Record) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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