aerospike

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(namespace string, setName string, client *as.Client, timeToLiveInSec uint32, options ...interface{}) (*Cache, error)

func (*Cache) AddValues

func (a *Cache) AddValues(ctx context.Context, entry *cache.Entry, values []interface{}) error

func (*Cache) AsSource

func (a *Cache) AsSource(ctx context.Context, entry *cache.Entry) (cache.Source, error)

func (*Cache) AssignRows

func (a *Cache) AssignRows(entry *cache.Entry, rows *sql.Rows) error

func (*Cache) Close

func (a *Cache) Close(ctx context.Context, entry *cache.Entry) error

func (*Cache) Delete

func (a *Cache) Delete(ctx context.Context, entry *cache.Entry) error

func (*Cache) Get

func (a *Cache) Get(ctx context.Context, SQL string, args []interface{}, options ...interface{}) (*cache.Entry, error)

func (*Cache) IndexBy

func (a *Cache) IndexBy(ctx context.Context, db *sql.DB, column, SQL string, args []interface{}) (int, error)

func (*Cache) Rollback

func (a *Cache) Rollback(ctx context.Context, entry *cache.Entry) error

func (*Cache) UpdateType

func (a *Cache) UpdateType(ctx context.Context, entry *cache.Entry, args []interface{}) (bool, error)

type Errors

type Errors struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Errors) Add

func (e *Errors) Add(err error)

func (*Errors) Err

func (e *Errors) Err() error

type FailureHandler added in v0.2.0

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

func NewFailureHandler added in v0.2.0

func NewFailureHandler(limit int64, resetAfter *time.Duration) *FailureHandler

func (*FailureHandler) Close added in v0.2.0

func (f *FailureHandler) Close() error

func (*FailureHandler) HandleFailure added in v0.2.0

func (f *FailureHandler) HandleFailure()

func (*FailureHandler) HandleSuccess added in v0.2.0

func (f *FailureHandler) HandleSuccess()

func (*FailureHandler) IsProbing added in v0.2.0

func (f *FailureHandler) IsProbing() bool

type IndexSource

type IndexSource interface {
	Close() error
	Index(value interface{}) *cache.Indexed
	ColumnIndex() int
}

func NewIndexSource

func NewIndexSource(column string, ordered bool, fields []*cache.Field, dest chan *cache.Indexed) (IndexSource, error)

type MultiReader

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

func NewMultiReader

func NewMultiReader(matcher *cache.ParmetrizedQuery) *MultiReader

func (*MultiReader) AddReader

func (m *MultiReader) AddReader(reader *Reader)

func (*MultiReader) Close

func (m *MultiReader) Close() error

func (*MultiReader) Read

func (m *MultiReader) Read(p []byte) (n int, err error)

func (*MultiReader) ReadLine

func (m *MultiReader) ReadLine() (line []byte, prefix bool, err error)

type OrderedSource

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

func NewOrderedSource

func NewOrderedSource(dest chan *cache.Indexed, index int) *OrderedSource

func (*OrderedSource) Close

func (o *OrderedSource) Close() error

func (*OrderedSource) ColumnIndex

func (o *OrderedSource) ColumnIndex() int

func (*OrderedSource) Index

func (o *OrderedSource) Index(value interface{}) *cache.Indexed

type Placeholders

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

func NewPlaceholders

func NewPlaceholders(columnIndex int, fields []*cache.Field) *Placeholders

func (*Placeholders) ColumnValue

func (p *Placeholders) ColumnValue() (interface{}, bool)

func (*Placeholders) CreatePlaceholderAt

func (p *Placeholders) CreatePlaceholderAt(i int)

func (*Placeholders) ScanPlaceholders

func (p *Placeholders) ScanPlaceholders() []interface{}

func (*Placeholders) Values

func (p *Placeholders) Values() []interface{}

type Reader

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

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(b []byte) (int, error)

func (*Reader) ReadLine

func (r *Reader) ReadLine() (line []byte, prefix bool, err error)

type RecordMatched

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

type SingleSource

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

func NewSingleSource

func NewSingleSource(dest chan *cache.Indexed) *SingleSource

func (*SingleSource) Close

func (s *SingleSource) Close() error

func (*SingleSource) ColumnIndex

func (s *SingleSource) ColumnIndex() int

func (*SingleSource) Index

func (s *SingleSource) Index(value interface{}) *cache.Indexed

type Source

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

func (*Source) CheckType

func (s *Source) CheckType(ctx context.Context, values []interface{}) (bool, error)

func (*Source) Close

func (s *Source) Close(ctx context.Context) error

func (*Source) ConvertColumns

func (s *Source) ConvertColumns() ([]io.Column, error)

func (*Source) Next

func (s *Source) Next() bool

func (*Source) Rollback

func (s *Source) Rollback(ctx context.Context) error

func (*Source) Scanner

func (s *Source) Scanner(ctx context.Context) cache.ScannerFn

func (*Source) XTypes

func (s *Source) XTypes() []*xunsafe.Type

type TimeoutConfig

type TimeoutConfig struct {
	MaxRetries            int
	TotalTimeoutMs        int
	SleepBetweenRetriesMs int
}

func (*TimeoutConfig) Init added in v0.2.0

func (t *TimeoutConfig) Init()

type UnorderedSource

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

func NewUnorderedSource

func NewUnorderedSource(dest chan *cache.Indexed, index int) *UnorderedSource

func (*UnorderedSource) Close

func (u *UnorderedSource) Close() error

func (*UnorderedSource) ColumnIndex

func (u *UnorderedSource) ColumnIndex() int

func (*UnorderedSource) Index

func (u *UnorderedSource) Index(columnValue interface{}) *cache.Indexed

type Writer

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

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Flush

func (w *Writer) Flush() error

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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