Server returns server information from the introspection service
(ctx context.Context)
| 890 | |
| 891 | // Server returns server information from the introspection service |
| 892 | func (c *Client) Server(ctx context.Context) (ServerInfo, error) { |
| 893 | c.connMu.Lock() |
| 894 | if c.conn == nil { |
| 895 | c.connMu.Unlock() |
| 896 | return ServerInfo{}, fmt.Errorf("no grpc connection available: %w", errdefs.ErrUnavailable) |
| 897 | } |
| 898 | c.connMu.Unlock() |
| 899 | |
| 900 | response, err := c.IntrospectionService().Server(ctx) |
| 901 | if err != nil { |
| 902 | return ServerInfo{}, err |
| 903 | } |
| 904 | return ServerInfo{ |
| 905 | UUID: response.UUID, |
| 906 | }, nil |
| 907 | } |
| 908 | |
| 909 | func (c *Client) resolveSnapshotterName(ctx context.Context, name string) (string, error) { |
| 910 | if name == "" { |
nothing calls this directly
no test coverage detected