ListDeployed returns all releases with Status == DEPLOYED. An error is returned if the storage backend fails to retrieve the releases.
()
| 138 | // ListDeployed returns all releases with Status == DEPLOYED. An error is returned |
| 139 | // if the storage backend fails to retrieve the releases. |
| 140 | func (s *Storage) ListDeployed() ([]release.Releaser, error) { |
| 141 | s.Logger().Debug("listing all deployed releases in storage") |
| 142 | return s.List(func(rls release.Releaser) bool { |
| 143 | rel, err := releaserToV1Release(rls) |
| 144 | if err != nil { |
| 145 | // This will only happen if calling code does not pass the proper types. This is |
| 146 | // a problem with the application and not user data. |
| 147 | s.Logger().Error("unable to convert release to typed release", slog.Any("error", err)) |
| 148 | panic(fmt.Sprintf("unable to convert release to typed release: %s", err)) |
| 149 | } |
| 150 | return relutil.StatusFilter(common.StatusDeployed).Check(rel) |
| 151 | }) |
| 152 | } |
| 153 | |
| 154 | // Deployed returns the last deployed release with the provided release name, or |
| 155 | // returns driver.NewErrNoDeployedReleases if not found. |
nothing calls this directly
no test coverage detected