aerospike

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecordReader

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

RecordReader satisfies the pipeline DataReader interface. It reads records from an Aerospike database and returns them as *models.Token.

func NewRecordReader

func NewRecordReader(
	ctx context.Context,
	client scanner,
	cfg *RecordReaderConfig,
	logger *slog.Logger,
) *RecordReader

NewRecordReader creates a new RecordReader.

func (*RecordReader) Close

func (r *RecordReader) Close()

Close cancels the Aerospike scan used to read records if it was started.

func (*RecordReader) Read

func (r *RecordReader) Read(ctx context.Context) (*models.Token, error)

Read reads the next record from the Aerospike database.

type RecordReaderConfig

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

RecordReaderConfig represents the configuration for scanning Aerospike records.

func NewRecordReaderConfig

func NewRecordReaderConfig(namespace string,
	setList []string,
	partitionFilter *a.PartitionFilter,
	nodes []*a.Node,
	scanPolicy *a.ScanPolicy,
	binList []string,
	timeBounds models.TimeBounds,
	scanLimiter *semaphore.Weighted,
	noTTLOnly bool,
	pageSize int64,
	rpsCollector *metrics.Collector,
) *RecordReaderConfig

NewRecordReaderConfig creates a new RecordReaderConfig.

type RestoreWriter

type RestoreWriter[T models.TokenConstraint] struct {
	// contains filtered or unexported fields
}

RestoreWriter satisfies the DataWriter interface. It writes the types from the models package to an Aerospike client It is used to restore data from a backup.

func NewRestoreWriter

func NewRestoreWriter[T models.TokenConstraint](
	asc dbWriter,
	writePolicy *a.WritePolicy,
	stats *models.RestoreStats,
	logger *slog.Logger,
	useBatchWrites bool,
	batchSize int,
	retryPolicy *models.RetryPolicy,
	rpsCollector *metrics.Collector,
	ignoreRecordError bool,
) *RestoreWriter[T]

NewRestoreWriter creates a new RestoreWriter.

func (*RestoreWriter[T]) Close

func (rw *RestoreWriter[T]) Close() error

Close satisfies the DataWriter interface.

func (*RestoreWriter[T]) Write

func (rw *RestoreWriter[T]) Write(ctx context.Context, data T) (int, error)

Write writes the types from the models package to an Aerospike DB.

type SindexReader

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

SindexReader satisfies the DataReader interface. It reads secondary indexes from a SIndexGetter and returns them as *models.SecondaryIndex.

func NewSIndexReader

func NewSIndexReader(client sindexGetter, namespace string, logger *slog.Logger) *SindexReader

NewSIndexReader creates a new SIndexReader.

func (*SindexReader) Close

func (r *SindexReader) Close()

Close satisfies the DataReader interface but is a no-op for the SIndexReader.

func (*SindexReader) Read

func (r *SindexReader) Read(ctx context.Context) (*models.Token, error)

Read reads the next secondary index from the SIndexGetter.

type UdfReader

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

UdfReader satisfies the DataReader interface. It reads UDFs from a UDFGetter and returns them as *models.UDF.

func NewUDFReader

func NewUDFReader(client udfGetter, logger *slog.Logger) *UdfReader

NewUDFReader creates a new UdfReader.

func (*UdfReader) Close

func (r *UdfReader) Close()

Close satisfies the DataReader interface but is a no-op for the UDFReader.

func (*UdfReader) Read

func (r *UdfReader) Read(ctx context.Context) (*models.Token, error)

Read reads the next UDF from the UDFGetter.

Directories

Path Synopsis
xdr

Jump to

Keyboard shortcuts

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