diff --git a/jetstream/kv.go b/jetstream/kv.go index ae892b4d7..91a1bdcef 100644 --- a/jetstream/kv.go +++ b/jetstream/kv.go @@ -123,6 +123,7 @@ type ( // Update will update the value if the latest revision matches. // If the provided revision is not the latest, Update will return an error. + // Update also resets the TTL associated with the key (if any). Update(ctx context.Context, key string, value []byte, revision uint64) (uint64, error) // Delete will place a delete marker and leave all revisions. A history diff --git a/kv.go b/kv.go index 4e7a3fdec..3cade1f82 100644 --- a/kv.go +++ b/kv.go @@ -54,6 +54,7 @@ type KeyValue interface { // Create will add the key/value pair iff it does not exist. Create(key string, value []byte) (revision uint64, err error) // Update will update the value iff the latest revision matches. + // Update also resets the TTL associated with the key (if any). Update(key string, value []byte, last uint64) (revision uint64, err error) // Delete will place a delete marker and leave all revisions. Delete(key string, opts ...DeleteOpt) error