Documentation
¶
Index ¶
- Constants
- Variables
- type ASBXToken
- type BackupStats
- func (s BackupStats) AddSIndexes(num uint32)
- func (s BackupStats) AddUDFs(num uint32)
- func (s BackupStats) GetBytesWritten() uint64
- func (s BackupStats) GetDuration() time.Duration
- func (b *BackupStats) GetFileCount() uint64
- func (s BackupStats) GetReadRecords() uint64
- func (s BackupStats) GetSIndexes() uint32
- func (s BackupStats) GetUDFs() uint32
- func (b *BackupStats) IncFiles()
- func (b *BackupStats) IsEmpty() bool
- func (s BackupStats) Start()
- func (s BackupStats) Stop()
- type File
- type Metrics
- type PartitionFilterSerialized
- type Record
- type RestoreStats
- func (s RestoreStats) AddSIndexes(num uint32)
- func (s RestoreStats) AddUDFs(num uint32)
- func (s RestoreStats) GetBytesWritten() uint64
- func (s RestoreStats) GetDuration() time.Duration
- func (rs *RestoreStats) GetErrorsInDoubt() uint64
- func (s RestoreStats) GetReadRecords() uint64
- func (rs *RestoreStats) GetRecordsExisted() uint64
- func (rs *RestoreStats) GetRecordsExpired() uint64
- func (rs *RestoreStats) GetRecordsFresher() uint64
- func (rs *RestoreStats) GetRecordsIgnored() uint64
- func (rs *RestoreStats) GetRecordsInserted() uint64
- func (rs *RestoreStats) GetRecordsSkipped() uint64
- func (s RestoreStats) GetSIndexes() uint32
- func (rs *RestoreStats) GetTotalBytesRead() uint64
- func (s RestoreStats) GetUDFs() uint32
- func (rs *RestoreStats) IncrErrorsInDoubt()
- func (rs *RestoreStats) IncrRecordsExisted()
- func (rs *RestoreStats) IncrRecordsFresher()
- func (rs *RestoreStats) IncrRecordsIgnored()
- func (rs *RestoreStats) IncrRecordsInserted()
- func (s RestoreStats) Start()
- func (s RestoreStats) Stop()
- type RetryPolicy
- type SIPathBinType
- type SIndex
- type SIndexPath
- type SIndexType
- type Sizer
- type TimeBounds
- type Token
- type TokenConstraint
- type TokenType
- type UDF
- type UDFType
Constants ¶
const ( // VoidTimeNeverExpire is used when a record should never expire. VoidTimeNeverExpire int64 = 0 // ExpirationNever is the Aerospike server's special TTL value for records // that should never expire. ExpirationNever uint32 = math.MaxUint32 )
const MonitorRecordsSetName = "<ERO~MRT"
MonitorRecordsSetName represents the MRT monitor set name.
Variables ¶
var ErrFilteredOut = errors.New("filtered out")
ErrFilteredOut is returned by a Data Processor when a token should be filtered out of the pipeline.
Functions ¶
This section is empty.
Types ¶
type ASBXToken ¶
ASBXToken represents data received from XDR or RAW payload data.
func NewASBXToken ¶
NewASBXToken creates new ASBX Token from XDR or RAW payload data.
type BackupStats ¶
type BackupStats struct { // total number of records in database TotalRecords atomic.Uint64 // contains filtered or unexported fields }
BackupStats stores the status of a backup job. Stats are updated in realtime by backup jobs.
func SumBackupStats ¶
func SumBackupStats(stats ...*BackupStats) *BackupStats
SumBackupStats combines multiple BackupStats.
func (BackupStats) AddSIndexes ¶
func (s BackupStats) AddSIndexes(num uint32)
func (BackupStats) GetBytesWritten ¶
func (s BackupStats) GetBytesWritten() uint64
func (BackupStats) GetDuration ¶
func (*BackupStats) GetFileCount ¶
func (b *BackupStats) GetFileCount() uint64
GetFileCount returns the number of files per backup.
func (BackupStats) GetReadRecords ¶
func (s BackupStats) GetReadRecords() uint64
func (BackupStats) GetSIndexes ¶
func (s BackupStats) GetSIndexes() uint32
func (*BackupStats) IncFiles ¶
func (b *BackupStats) IncFiles()
IncFiles increments by one the number of files per backup.
func (*BackupStats) IsEmpty ¶
func (b *BackupStats) IsEmpty() bool
IsEmpty determines whether the BackupStats is empty.
type File ¶
type File struct { Name string Reader io.ReadCloser }
File represents a file with name and reader.
type Metrics ¶
type Metrics struct { PipelineReadQueueSize int PipelineWriteQueueSize int RecordsPerSecond uint64 KilobytesPerSecond uint64 }
Metrics contains app metrics.
func NewMetrics ¶
NewMetrics returns a new Metrics with the provided values.
func SumMetrics ¶
SumMetrics returns a new Metrics object that is the sum of Metrics.
type PartitionFilterSerialized ¶
type PartitionFilterSerialized struct { Begin int Count int Digest []byte Cursor []byte // Worker number. N int }
PartitionFilterSerialized represent serialized a.PartitionFilter. To save cursor state.
func NewPartitionFilterSerialized ¶
func NewPartitionFilterSerialized(pf *a.PartitionFilter) (PartitionFilterSerialized, error)
NewPartitionFilterSerialized serialize *a.PartitionFilter and returns new PartitionFilterSerialized instance.
func (*PartitionFilterSerialized) Decode ¶
func (p *PartitionFilterSerialized) Decode() (*a.PartitionFilter, error)
Decode decodes *PartitionFilterSerialized to *a.PartitionFilter
func (*PartitionFilterSerialized) IsEmpty ¶
func (p *PartitionFilterSerialized) IsEmpty() bool
type RestoreStats ¶
type RestoreStats struct { // The number of records dropped because they were expired. RecordsExpired atomic.Uint64 // The number of records dropped because they didn't contain any of the // selected bins or didn't belong to any of the selected sets. RecordsSkipped atomic.Uint64 // The number of records ignored because of record level permanent error while // restoring. // E.g.: if RestoreConfig.IgnoreRecordError = true. RecordsIgnored atomic.Uint64 // Total number of bytes read from source. TotalBytesRead atomic.Uint64 // contains filtered or unexported fields }
RestoreStats stores the stats of a restore operation from the reader job.
func NewRestoreStats ¶
func NewRestoreStats() *RestoreStats
NewRestoreStats returns new restore stats.
func SumRestoreStats ¶
func SumRestoreStats(stats ...*RestoreStats) *RestoreStats
SumRestoreStats combines multiple RestoreStats.
func (RestoreStats) AddSIndexes ¶
func (s RestoreStats) AddSIndexes(num uint32)
func (RestoreStats) GetBytesWritten ¶
func (s RestoreStats) GetBytesWritten() uint64
func (RestoreStats) GetDuration ¶
func (*RestoreStats) GetErrorsInDoubt ¶
func (rs *RestoreStats) GetErrorsInDoubt() uint64
func (RestoreStats) GetReadRecords ¶
func (s RestoreStats) GetReadRecords() uint64
func (*RestoreStats) GetRecordsExisted ¶
func (rs *RestoreStats) GetRecordsExisted() uint64
func (*RestoreStats) GetRecordsExpired ¶
func (rs *RestoreStats) GetRecordsExpired() uint64
func (*RestoreStats) GetRecordsFresher ¶
func (rs *RestoreStats) GetRecordsFresher() uint64
func (*RestoreStats) GetRecordsIgnored ¶
func (rs *RestoreStats) GetRecordsIgnored() uint64
func (*RestoreStats) GetRecordsInserted ¶
func (rs *RestoreStats) GetRecordsInserted() uint64
func (*RestoreStats) GetRecordsSkipped ¶
func (rs *RestoreStats) GetRecordsSkipped() uint64
func (RestoreStats) GetSIndexes ¶
func (s RestoreStats) GetSIndexes() uint32
func (*RestoreStats) GetTotalBytesRead ¶
func (rs *RestoreStats) GetTotalBytesRead() uint64
func (*RestoreStats) IncrErrorsInDoubt ¶
func (rs *RestoreStats) IncrErrorsInDoubt()
func (*RestoreStats) IncrRecordsExisted ¶
func (rs *RestoreStats) IncrRecordsExisted()
func (*RestoreStats) IncrRecordsFresher ¶
func (rs *RestoreStats) IncrRecordsFresher()
func (*RestoreStats) IncrRecordsIgnored ¶
func (rs *RestoreStats) IncrRecordsIgnored()
func (*RestoreStats) IncrRecordsInserted ¶
func (rs *RestoreStats) IncrRecordsInserted()
type RetryPolicy ¶
type RetryPolicy struct { // BaseTimeout is the initial delay between retry attempts. BaseTimeout time.Duration // Multiplier is used to increase the delay between subsequent retry attempts. // The actual delay is calculated as: BaseTimeout * (Multiplier ^ attemptNumber) Multiplier float64 // MaxRetries is the maximum number of retry attempts that will be made. // If set to 0, no retries will be performed. MaxRetries uint }
RetryPolicy defines the configuration for retry attempts in case of failures.
func NewDefaultRetryPolicy ¶
func NewDefaultRetryPolicy() *RetryPolicy
NewDefaultRetryPolicy returns a new RetryPolicy with default values.
func NewRetryPolicy ¶
func NewRetryPolicy(baseTimeout time.Duration, multiplier float64, maxRetries uint) *RetryPolicy
NewRetryPolicy returns new configuration for retry attempts in case of failures.
func (*RetryPolicy) Validate ¶
func (p *RetryPolicy) Validate() error
Validate checks retry policy values.
type SIPathBinType ¶
type SIPathBinType byte
const ( InvalidSIDataType SIPathBinType = 0 NumericSIDataType SIPathBinType = 'N' StringSIDataType SIPathBinType = 'S' GEO2DSphereSIDataType SIPathBinType = 'G' BlobSIDataType SIPathBinType = 'B' )
type SIndex ¶
type SIndex struct { Namespace string Set string Name string Path SIndexPath IndexType SIndexType Expression string }
type SIndexPath ¶
type SIndexPath struct { BinName string B64Context string BinType SIPathBinType }
type SIndexType ¶
type SIndexType byte
const ( InvalidSIndex SIndexType = 0 BinSIndex SIndexType = 'N' ListElementSIndex SIndexType = 'L' MapKeySIndex SIndexType = 'K' MapValueSIndex SIndexType = 'V' )
type TimeBounds ¶
TimeBounds represents a period of time between two timestamps.
type Token ¶
type Token struct { SIndex *SIndex UDF *UDF Record *Record Type TokenType Size uint64 // Filter represents serialized partition filter for page, that record belongs to. // Is used only on pagination read, to save reading states. Filter *PartitionFilterSerialized }
Token encompasses the other data models. The fields should be accessed based on the tokenType.
func NewRecordToken ¶
func NewRecordToken(r *Record, size uint64, filter *PartitionFilterSerialized) *Token
NewRecordToken creates a new token with the given record.
func NewSIndexToken ¶
NewSIndexToken creates a new token with the given secondary index.
func NewUDFToken ¶
NewUDFToken creates a new token with the given UDF.