(ctx context.Context)
| 514 | } |
| 515 | |
| 516 | func (c *Client) GetConfig(ctx context.Context) ([]byte, error) { |
| 517 | c.refreshBestClusterNode(ctx) |
| 518 | cmd, errClient := c.commandClient() |
| 519 | if errClient != nil { |
| 520 | return nil, errClient |
| 521 | } |
| 522 | raw, err := cmd.Get(ctx, redisKeyConfig).Bytes() |
| 523 | if errors.Is(err, redis.Nil) { |
| 524 | return nil, ErrConfigNotFound |
| 525 | } |
| 526 | if err != nil { |
| 527 | return nil, err |
| 528 | } |
| 529 | if len(raw) == 0 { |
| 530 | return nil, ErrEmptyResponse |
| 531 | } |
| 532 | return raw, nil |
| 533 | } |
| 534 | |
| 535 | func (c *Client) GetModels(ctx context.Context, headers http.Header, query url.Values) ([]byte, error) { |
| 536 | cmd, errClient := c.commandClient() |
no test coverage detected