mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-28 14:08:43 +02:00
use retry package
This commit is contained in:
parent
de6d559a08
commit
54369e83e9
9 changed files with 274 additions and 161 deletions
22
internal/zero/reconciler/cloud_api.go
Normal file
22
internal/zero/reconciler/cloud_api.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package reconciler
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// GetBundles returns the list of bundles that have to be present in the cluster.
|
||||
func (c *service) RefreshBundleList(ctx context.Context) error {
|
||||
resp, err := c.config.api.GetClusterResourceBundles(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("get bundles: %w", err)
|
||||
}
|
||||
|
||||
ids := make([]string, 0, len(resp.Bundles))
|
||||
for _, v := range resp.Bundles {
|
||||
ids = append(ids, v.Id)
|
||||
}
|
||||
|
||||
c.bundles.Set(ids)
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue