Documentation ¶
Index ¶
- func GetNowTimestamp() uint64
- func SaveAgentMeta(path string, meta AgentMeta) error
- type AgentMeta
- type CFIndex
- type DB
- func (d *DB) Close()
- func (d *DB) ColumnFamilyHandles() grocksdb.ColumnFamilyHandles
- func (d *DB) DeleteExpiredRecords() (numDeleted int, deletionErr error)
- func (d *DB) Destroy() error
- func (d *DB) Flush() error
- func (d *DB) GetRecord(topic string, fragmentId uint32, offset uint64) (*grocksdb.Slice, error)
- func (d *DB) PutRecord(topic string, fragmentId uint32, offset uint64, seqNum uint64, data []byte, ...) error
- func (d *DB) Scan(cfIndex CFIndex) *grocksdb.Iterator
- type FragmentKey
- type RecordKey
- type RecordValue
- type RetentionPeriodKey
- type RetentionScheduler
- type TopicFragmentOffsets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNowTimestamp ¶
func GetNowTimestamp() uint64
func SaveAgentMeta ¶
Types ¶
type AgentMeta ¶
type AgentMeta struct { PublisherID string SubscriberID string PublishedOffsets TopicFragmentOffsets SubscribedOffsets TopicFragmentOffsets LastFetchedOffset TopicFragmentOffsets }
func LoadAgentMeta ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is helper for grocksdb
func (*DB) ColumnFamilyHandles ¶
func (d *DB) ColumnFamilyHandles() grocksdb.ColumnFamilyHandles
func (*DB) DeleteExpiredRecords ¶
DeleteExpiredRecords Record only can be deleted on expired
type FragmentKey ¶
type FragmentKey string
func NewFragmentKey ¶
func NewFragmentKey(topicName string, fragmentId uint) FragmentKey
type RecordValue ¶
func NewRecordValue ¶
func NewRecordValue(slice *grocksdb.Slice) *RecordValue
func NewRecordValueFromData ¶
func NewRecordValueFromData(seqNum uint64, publishedData []byte) *RecordValue
func (RecordValue) Data ¶
func (v RecordValue) Data() []byte
func (RecordValue) PublishedData ¶
func (v RecordValue) PublishedData() []byte
func (RecordValue) SeqNum ¶
func (v RecordValue) SeqNum() uint64
func (*RecordValue) SetData ¶
func (v *RecordValue) SetData(data []byte)
func (RecordValue) Size ¶
func (v RecordValue) Size() int
type RetentionPeriodKey ¶
func NewRetentionPeriodKey ¶
func NewRetentionPeriodKey(slice *grocksdb.Slice) *RetentionPeriodKey
func NewRetentionPeriodKeyFromData ¶
func NewRetentionPeriodKeyFromData(recordKey *RecordKey, expirationDate uint64) *RetentionPeriodKey
func (RetentionPeriodKey) Data ¶
func (k RetentionPeriodKey) Data() []byte
func (RetentionPeriodKey) ExpirationDate ¶
func (k RetentionPeriodKey) ExpirationDate() uint64
func (RetentionPeriodKey) RecordKey ¶
func (k RetentionPeriodKey) RecordKey() RecordKey
func (*RetentionPeriodKey) SetData ¶
func (k *RetentionPeriodKey) SetData(data []byte)
func (RetentionPeriodKey) Size ¶
func (k RetentionPeriodKey) Size() int
type RetentionScheduler ¶
type RetentionScheduler struct {
// contains filtered or unexported fields
}
func NewRetentionScheduler ¶
func NewRetentionScheduler(db *DB, interval uint) *RetentionScheduler
NewRetentionScheduler interval is milliseconds
func (*RetentionScheduler) Run ¶
func (r *RetentionScheduler) Run(ctx context.Context)
type TopicFragmentOffsets ¶
func NewTopicFragmentOffsets ¶
func NewTopicFragmentOffsets(m map[FragmentKey]uint64) TopicFragmentOffsets
func (*TopicFragmentOffsets) ToMap ¶
func (o *TopicFragmentOffsets) ToMap() map[FragmentKey]uint64
Click to show internal directories.
Click to hide internal directories.