(ctx context.Context)
| 191 | } |
| 192 | |
| 193 | func (om *Manager) loadConfigFromBucket(ctx context.Context) ([]byte, error) { |
| 194 | readCloser, err := om.bucketClient.Get(ctx, om.cfg.LoadPath) |
| 195 | if err != nil { |
| 196 | return nil, errors.Wrap(err, "open file") |
| 197 | } |
| 198 | |
| 199 | buf, err := io.ReadAll(readCloser) |
| 200 | if err != nil { |
| 201 | return nil, errors.Wrap(err, "read entire file") |
| 202 | } |
| 203 | |
| 204 | err = readCloser.Close() |
| 205 | return buf, err |
| 206 | } |
| 207 | |
| 208 | func (om *Manager) setConfig(config any) { |
| 209 | om.configMtx.Lock() |
no test coverage detected