NewManager creates a new Manager with the given session expiry duration.
(expiry time.Duration)
| 58 | |
| 59 | // NewManager creates a new Manager with the given session expiry duration. |
| 60 | func NewManager(expiry time.Duration) *Manager { |
| 61 | return &Manager{ |
| 62 | sessions: make(map[string]*Session), |
| 63 | expiry: expiry, |
| 64 | stopCh: make(chan struct{}), |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | // Touch creates or updates a session. Returns the session. |
| 69 | // When conversationKey is non-empty it is used directly as the session ID |
no outgoing calls