File tree 1 file changed +18
-0
lines changed
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) {
129
129
return session .store .NextTargetMsgSeqNum (), nil
130
130
}
131
131
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
+
132
150
func registerSession (s * session ) error {
133
151
sessionsLock .Lock ()
134
152
defer sessionsLock .Unlock ()
You can’t perform that action at this time.
0 commit comments