clientv3: add WithPrevKV OpOption

This commit is contained in:
Gyu-Ho Lee 2016-10-07 10:54:45 -07:00
parent fe7379f102
commit 0544d4bfd0

View File

@ -274,3 +274,11 @@ func WithProgressNotify() OpOption {
op.progressNotify = true
}
}
// WithPrevKV gets the previous key-value pair before the event happens. If the previous KV is already compacted,
// nothing will be returned.
func WithPrevKV() OpOption {
return func(op *Op) {
op.prevKV = true
}
}