client

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAerospikePool = &Pool{}

Functions

This section is empty.

Types

type Option added in v0.16.0

type Option func(srv *Service)

func WithBasePolicy added in v0.16.0

func WithBasePolicy(basePolicy *aero.BasePolicy) Option

WithBasePolicy will provide an initial BasePolicy. Even when overridden, the timeout will be applied UNLESS using WithBypassConfiguredTimeout.

func WithBypassConfiguredTimeout added in v0.16.0

func WithBypassConfiguredTimeout() Option

WithBypassConfiguredTimeout will bypass the configured timeout if using WithClientPolicy or WithBasePolicy.

func WithClientPolicy added in v0.16.0

func WithClientPolicy(clientPolicy *aero.ClientPolicy) Option

WithClientPolicy will provide an initial ClientPolicy. Even when overridden, the timeout will be applied UNLESS using WithBypassConfiguredTimeout.

type Pool added in v0.16.0

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

type Service

type Service struct {
	*aero.Client

	*circut.Breaker
	// contains filtered or unexported fields
}

Service represents aerospike client Service

func New

func New(config *datastore.Connection) (*Service, error)

New creates a new Aerospike service

func NewWithOptions added in v0.16.0

func NewWithOptions(config *datastore.Connection, options ...Option) (*Service, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, key *aero.Key, binNames ...string) (record *aero.Record, err error)

Get returns record for supplied key and optional bin names.

func (*Service) Probe added in v0.10.0

func (s *Service) Probe()

func (*Service) Put

func (s *Service) Put(writePolicy *aero.WritePolicy, key *aero.Key, value aero.BinMap) error

Put puts a record to Aerospike. Context is not supported since the Aerospike library does not support it.

Jump to

Keyboard shortcuts

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