mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
session: add comments to the session.State types
This commit is contained in:
parent
1a389d1a0d
commit
68ae704229
1 changed files with 21 additions and 1 deletions
|
|
@ -26,10 +26,30 @@ const (
|
|||
// State represents the state of a session.
|
||||
type State uint8
|
||||
|
||||
/*
|
||||
/---> StateExpired
|
||||
StateCreated ---
|
||||
\---> StateRevoked
|
||||
*/
|
||||
|
||||
const (
|
||||
// StateCreated is the state of a session once it has been fully
|
||||
// committed to the Store and is ready to be used. This is the first
|
||||
// state of a session.
|
||||
StateCreated State = 0
|
||||
StateInUse State = 1
|
||||
|
||||
// StateInUse is the state of a session that is currently being used.
|
||||
//
|
||||
// NOTE: this state is not currently used, but we keep it around for now
|
||||
// since old sessions might still have this state persisted.
|
||||
StateInUse State = 1
|
||||
|
||||
// StateRevoked is the state of a session that has been revoked before
|
||||
// its expiry date.
|
||||
StateRevoked State = 2
|
||||
|
||||
// StateExpired is the state of a session that has passed its expiry
|
||||
// date.
|
||||
StateExpired State = 3
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue