LastEventSeq returns the most recent event sequence number for sessionID, so a snapshot can advertise the exact point from which a client should tail. Returns 0 and false when no event log exists.
(sessionID string)
| 164 | // so a snapshot can advertise the exact point from which a client should tail. |
| 165 | // Returns 0 and false when no event log exists. |
| 166 | func (sm *SessionManager) LastEventSeq(sessionID string) (uint64, bool) { |
| 167 | pe, ok := sm.eventLogs.Load(sessionID) |
| 168 | if !ok { |
| 169 | return 0, false |
| 170 | } |
| 171 | return pe.log.lastSeq(), true |
| 172 | } |
| 173 | |
| 174 | // RegisterFollowUpInjector registers fn as the follow-up delivery path for an |
| 175 | // attached sessionID. When set, [SessionManager.FollowUpSession] routes |