| 2769 | } |
| 2770 | |
| 2771 | func (c *unixSocketClient) GetSession(ctx context.Context, id string) (SessionRecord, error) { |
| 2772 | var response struct { |
| 2773 | Session SessionRecord `json:"session"` |
| 2774 | } |
| 2775 | path, err := c.sessionScopedPath(ctx, id, "") |
| 2776 | if err != nil { |
| 2777 | return SessionRecord{}, err |
| 2778 | } |
| 2779 | if err := c.doJSON( |
| 2780 | ctx, |
| 2781 | http.MethodGet, |
| 2782 | path, |
| 2783 | nil, |
| 2784 | nil, |
| 2785 | &response, |
| 2786 | ); err != nil { |
| 2787 | return SessionRecord{}, err |
| 2788 | } |
| 2789 | return response.Session, nil |
| 2790 | } |
| 2791 | |
| 2792 | func (c *unixSocketClient) GetSessionHealth(ctx context.Context, id string) (SessionHealthRecord, error) { |
| 2793 | var response struct { |