Rewrite authentication flow (#2374)
This commit is contained in:
parent
e172c29360
commit
d57a55c024
20 changed files with 848 additions and 996 deletions
|
@ -102,6 +102,20 @@ func (su *StateUpdate) Empty() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func StateSelf(nodeID NodeID) StateUpdate {
|
||||
return StateUpdate{
|
||||
Type: StateSelfUpdate,
|
||||
ChangeNodes: []NodeID{nodeID},
|
||||
}
|
||||
}
|
||||
|
||||
func StateUpdatePeerAdded(nodeIDs ...NodeID) StateUpdate {
|
||||
return StateUpdate{
|
||||
Type: StatePeerChanged,
|
||||
ChangeNodes: nodeIDs,
|
||||
}
|
||||
}
|
||||
|
||||
func StateUpdateExpire(nodeID NodeID, expiry time.Time) StateUpdate {
|
||||
return StateUpdate{
|
||||
Type: StatePeerChangedPatch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue