Documentation ¶
Index ¶
- type Storage
- func (s *Storage) Create(rls *rspb.Release) error
- func (s *Storage) Delete(name string, version int32) (*rspb.Release, error)
- func (s *Storage) Deployed(name string) (*rspb.Release, error)
- func (s *Storage) Get(name string, version int32) (*rspb.Release, error)
- func (s *Storage) History(name string) ([]*rspb.Release, error)
- func (s *Storage) Last(name string) (*rspb.Release, error)
- func (s *Storage) ListDeleted() ([]*rspb.Release, error)
- func (s *Storage) ListDeployed() ([]*rspb.Release, error)
- func (s *Storage) ListFilterAll(fns ...relutil.FilterFunc) ([]*rspb.Release, error)
- func (s *Storage) ListFilterAny(fns ...relutil.FilterFunc) ([]*rspb.Release, error)
- func (s *Storage) ListReleases() ([]*rspb.Release, error)
- func (s *Storage) LockRelease(name string) error
- func (s *Storage) UnlockRelease(name string)
- func (s *Storage) Update(rls *rspb.Release) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
Storage represents a storage engine for a Release.
func Init ¶
Init initializes a new storage backend with the driver d. If d is nil, the default in-memory driver is used.
func (*Storage) Create ¶
Create creates a new storage entry holding the release. An error is returned if the storage driver failed to store the release, or a release with identical an key already exists.
func (*Storage) Delete ¶
Delete deletes the release from storage. An error is returned if the storage backend fails to delete the release or if the release does not exist.
func (*Storage) Deployed ¶
Deployed returns the deployed release with the provided release name, or returns ErrReleaseNotFound if not found.
func (*Storage) Get ¶
Get retrieves the release from storage. An error is returned if the storage driver failed to fetch the release, or the release identified by the key, version pair does not exist.
func (*Storage) History ¶
History returns the revision history for the release with the provided name, or returns ErrReleaseNotFound if no such release name exists.
func (*Storage) Last ¶
Last fetches the last revision of the named release.
func (*Storage) ListDeleted ¶
ListDeleted returns all releases with Status == DELETED. An error is returned if the storage backend fails to retrieve the releases.
func (*Storage) ListDeployed ¶
ListDeployed returns all releases with Status == DEPLOYED. An error is returned if the storage backend fails to retrieve the releases.
func (*Storage) ListFilterAll ¶
ListFilterAll returns the set of releases satisfying satisfying the predicate (filter0 && filter1 && ... && filterN), i.e. a Release is included in the results if and only if all filters return true.
func (*Storage) ListFilterAny ¶
ListFilterAny returns the set of releases satisfying satisfying the predicate (filter0 || filter1 || ... || filterN), i.e. a Release is included in the results if at least one of the filters returns true.
func (*Storage) ListReleases ¶
ListReleases returns all releases from storage. An error is returned if the storage backend fails to retrieve the releases.
func (*Storage) LockRelease ¶
LockRelease gains a mutually exclusive access to a release via a mutex.
func (*Storage) UnlockRelease ¶
UnlockRelease releases a mutually exclusive access to a release. If release doesn't exist or wasn't previously locked - the unlock will pass