Documentation
¶
Index ¶
- func ByAge(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)
- func ByAgeMulti(ctx context.Context, l klevdb.Log, before time.Time, ...) (map[int64]struct{}, int64, error)
- func ByCount(ctx context.Context, l klevdb.Log, max int) (map[int64]struct{}, int64, error)
- func ByCountMulti(ctx context.Context, l klevdb.Log, max int, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
- func ByOffset(ctx context.Context, l klevdb.Log, before int64) (map[int64]struct{}, int64, error)
- func ByOffsetMulti(ctx context.Context, l klevdb.Log, before int64, ...) (map[int64]struct{}, int64, error)
- func BySize(ctx context.Context, l klevdb.Log, sz int64) (map[int64]struct{}, int64, error)
- func BySizeMulti(ctx context.Context, l klevdb.Log, sz int64, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
- func FindByAge(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, error)
- func FindByCount(ctx context.Context, l klevdb.Log, max int) (map[int64]struct{}, error)
- func FindByOffset(ctx context.Context, l klevdb.Log, before int64) (map[int64]struct{}, error)
- func FindBySize(ctx context.Context, l klevdb.Log, sz int64) (map[int64]struct{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByAge ¶
ByAge tries to remove the messages at the start of the log before given time.
returns the offsets it deleted and the amount of storage freed
func ByAgeMulti ¶ added in v0.9.0
func ByAgeMulti(ctx context.Context, l klevdb.Log, before time.Time, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
ByAgeMulti is similar to ByAge, but will try to remove messages from multiple segments
func ByCount ¶ added in v0.2.3
ByCount tries to remove messages to keep the number of messages in the log under max count.
returns the offsets it deleted and the amount of storage freed
func ByCountMulti ¶ added in v0.9.0
func ByCountMulti(ctx context.Context, l klevdb.Log, max int, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
ByCountMulti is similar to ByCount, but will try to remove messages from multiple segments
func ByOffset ¶ added in v0.2.5
ByOffset tries to remove the messages at the start of the log before offset
returns the offsets it deleted and the amount of storage freed
func ByOffsetMulti ¶ added in v0.9.0
func ByOffsetMulti(ctx context.Context, l klevdb.Log, before int64, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
ByOffsetMulti is similar to ByOffset, but will try to remove messages from multiple segments
func BySize ¶
BySize tries to remove messages until log size is less then sz
returns the offsets it deleted and the amount of storage freed
func BySizeMulti ¶ added in v0.9.0
func BySizeMulti(ctx context.Context, l klevdb.Log, sz int64, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)
BySizeMulti is similar to BySize, but will try to remove messages from multiple segments
func FindByAge ¶ added in v0.3.0
FindByAge returns a set of offsets for messages that are at the start of the log and before given time.
func FindByCount ¶ added in v0.3.0
FindByCount returns a set of offsets for messages that when removed will keep number of the messages in the log less then max
func FindByOffset ¶ added in v0.3.0
FindByOffset returns a set of offsets for messages that offset is before a given offset
Types ¶
This section is empty.