of

fun of(duration: Duration): Expiry

The document will expire after the given duration.

Throws

if the duration is less than 1 second.


fun of(instant: Instant): Expiry

The document will expire at the given instant. If the instant is in the recent past, the document will expire immediately.

Throws

if the instant is in the distant past (prior to 1970-02-01T00:00:00Z).