vertx / io.vertx.kotlin.ext.consul / sessionOptionsOf

# sessionOptionsOf

`fun sessionOptionsOf(behavior: SessionBehavior? = null, checks: Iterable<String>? = null, lockDelay: Long? = null, name: String? = null, node: String? = null, ttl: Long? = null): SessionOptions`

A function providing a DSL for building io.vertx.ext.consul.SessionOptions objects.

Options used to create session.

### Parameters

`behavior` - Set the behavior when a session is invalidated. The release behavior is the default if none is specified.

`checks` - Set a list of associated health checks. It is highly recommended that, if you override this list, you include the default "serfHealth"

`lockDelay` - Set the lock-delay period.

`name` - Set the human-readable name for the Session

`node` - Set the node to which the session will be assigned

`ttl` - Set the TTL interval. When TTL interval expires without being renewed, the session has expired and an invalidation is triggered. If specified, it must be between 10s and 86400s currently. The contract of a TTL is that it represents a lower bound for invalidation; that is, Consul will not expire the session before the TTL is reached, but it is allowed to delay the expiration past the TTL. The lowest practical TTL should be used to keep the number of managed sessions low. When locks are forcibly expired, such as during a leader election, sessions may not be reaped for up to double this TTL, so long TTL values (> 1 hour) should be avoided.