File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,24 @@ func GetExpectedTargetNum(sessionID SessionID) (int, error) {
129129 return session .store .NextTargetMsgSeqNum (), nil
130130}
131131
132+ // GetMessageStore returns the MessageStore interface for session matching the session id.
133+ func GetMessageStore (sessionID SessionID ) (MessageStore , error ) {
134+ session , ok := lookupSession (sessionID )
135+ if ! ok {
136+ return nil , errUnknownSession
137+ }
138+ return session .store , nil
139+ }
140+
141+ // GetLog returns the Log interface for session matching the session id.
142+ func GetLog (sessionID SessionID ) (Log , error ) {
143+ session , ok := lookupSession (sessionID )
144+ if ! ok {
145+ return nil , errUnknownSession
146+ }
147+ return session .log , nil
148+ }
149+
132150func registerSession (s * session ) error {
133151 sessionsLock .Lock ()
134152 defer sessionsLock .Unlock ()
You can’t perform that action at this time.
0 commit comments