Sessions returns an iterator that yields the current set of server sessions. There is no guarantee that the iterator observes sessions that are added or removed during iteration.
()
| 692 | // There is no guarantee that the iterator observes sessions that are added or |
| 693 | // removed during iteration. |
| 694 | func (s *Server) Sessions() iter.Seq[*ServerSession] { |
| 695 | s.mu.Lock() |
| 696 | clients := slices.Clone(s.sessions) |
| 697 | s.mu.Unlock() |
| 698 | return slices.Values(clients) |
| 699 | } |
| 700 | |
| 701 | func (s *Server) listPrompts(_ context.Context, req *ListPromptsRequest) (*ListPromptsResult, error) { |
| 702 | s.mu.Lock() |
no outgoing calls