Documentation
¶
Index ¶
- func Deletes(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)
- func DeletesMulti(ctx context.Context, l klevdb.Log, before time.Time, ...) (map[int64]struct{}, int64, error)
- func FindDeletes(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, error)
- func FindUpdates(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, error)
- func Updates(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)
- func UpdatesMulti(ctx context.Context, l klevdb.Log, before time.Time, ...) (map[int64]struct{}, int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deletes ¶
func Deletes(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)
Deletes tries to remove messages with nil value before given time. It will not remove messages for keys it sees before that offset.
This is similar to removing keys, which were deleted (e.g. value set to nil) and are therfore no longer relevant/active.
returns the offsets it deleted and the amount of storage freed
func DeletesMulti ¶ added in v0.9.0
func DeletesMulti(ctx context.Context, l klevdb.Log, before time.Time, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
DeletesMulti is similar to Deletes, but will try to remove messages from multiple segments
func FindDeletes ¶ added in v0.3.0
FindDeletes returns a set of offsets for messages with nil value for a given key, before a given time.
Messages that have a nil value are considered deletes for this key, and therefore eligible for deletion.
func FindUpdates ¶ added in v0.3.0
FindUpdates returns a set of offsets for messages that have the same key further in the log, before a given time.
Messages before the last one for a given key are considered updates that are no longer relevant, and therefore are eligible for deletion.
func Updates ¶
func Updates(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)
Updates tries to remove messages before given time that are repeated further in the log leaving only the last message for a given key.
This is similar to removing the old value updates, leaving only the current value (last update) for a key.
returns the offsets it deleted and the amount of storage freed
Types ¶
This section is empty.