api: Adding constants for session behaviors

This commit is contained in:
Armon Dadgar 2015-01-07 14:01:27 -08:00
parent b3f974dee0
commit bb3829c2d9
1 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,17 @@ import (
"time" "time"
) )
const (
// SessionBehaviorRelease is the default behavior and causes
// all associated locks to be released on session invalidation.
SessionBehaviorRelease = "release"
// SessionBehaviorDelete is new in Consul 0.5 and changes the
// behavior to delete all associated locks on session invalidation.
// It can be used in a way similar to Ephemeral Nodes in ZooKeeper.
SessionBehaviorDelete = "delete"
)
// SessionEntry represents a session in consul // SessionEntry represents a session in consul
type SessionEntry struct { type SessionEntry struct {
CreateIndex uint64 CreateIndex uint64