-
Notifications
You must be signed in to change notification settings - Fork 878
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementsdk/go
Description
The API and documentation around session disposal are counterintuitive and contradictory such that it isn't clear how to go about this:
- Session.Destroy() docs say it "destroys this session and releases all associated resources" and that the session can no longer be used after calling this method. So far so good: "destroy" implies an irreversible operation leaving nothing behind. However, the docs go on to contradict this by saying that the conversation can be resumed by calling
Client.ResumeSession(). Maybe "destroy" is the wrong verb here; how about "suspend" or "close"? - Client.DeleteSession() naively appears equivalent to
Session.Destroy()but apparently it's a superset: it does everythingDestroydoes plus it deletes files. It isn't clear how I should decide whether to "delete" or "destroy" a session. - Client.Stop() is documented as both "closing" and "destroying" all active sessions. This is confusing because "destroy" implies an irreversible operation leaving nothing behind while "close" is ambiguous (what happens to session resources on closure?). Because this method calls
Session.Destroy()on each active session, it apparently leaves their files behind. Maybe this is again suggesting "close" as a better verb than "destroy". In any case, the docs should at least call out thatClient.Stop()leaves session artifacts behind and SDK users who want to remove them must explicitly delete sessions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementsdk/go