Documentation ¶
Overview ¶
Package storage implements storage for Tiller objects.The backend storage mechanism may be implemented with different backends. This package and its subpackages provide storage layers for Tiller objects.
Index ¶
- type FilterFunc
- type Storage
- func (s *Storage) Create(rls *rspb.Release) error
- func (s *Storage) Delete(key string) (*rspb.Release, error)
- func (s *Storage) Get(key string) (*rspb.Release, error)
- func (s *Storage) ListDeleted() ([]*rspb.Release, error)
- func (s *Storage) ListDeployed() ([]*rspb.Release, error)
- func (s *Storage) ListFilterAll(filters ...FilterFunc) ([]*rspb.Release, error)
- func (s *Storage) ListFilterAny(filters ...FilterFunc) ([]*rspb.Release, error)
- func (s *Storage) ListReleases() ([]*rspb.Release, error)
- 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 FilterFunc ¶
FilterFunc returns true if the release object satisfies the predicate of the underlying func.
func All ¶
func All(filters ...FilterFunc) FilterFunc
All returns a FilterFunc that filters a list of releases determined by the predicate 'f0 && f1 && ... && fn'.
func Any ¶
func Any(filters ...FilterFunc) FilterFunc
Any returns a FilterFunc that filters a list of releases determined by the predicate 'f0 || f1 || ... || fn'.
func StatusFilter ¶
func StatusFilter(status rspb.Status_Code) FilterFunc
StatusFilter filters a set of releases by status code.
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) 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 key does not exist.
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 ¶
func (s *Storage) ListFilterAll(filters ...FilterFunc) ([]*rspb.Release, error)
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 ¶
func (s *Storage) ListFilterAny(filters ...FilterFunc) ([]*rspb.Release, error)
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.