storagedriver

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ReleasesDriverName = "Release"

ReleasesDriverName is the string name of the driver.

Variables

This section is empty.

Functions

This section is empty.

Types

type Releases

type Releases struct {
	Log func(string, ...interface{})
	// contains filtered or unexported fields
}

Releases is a wrapper around an implementation of a kubernetes ReleasesInterface.

func NewReleases

func NewReleases(impl releaseclient.ReleaseInterface) *Releases

NewReleases initializes a new Releases wrapping an implementation of the kubernetes ReleasesInterface.

func (*Releases) Create

func (rel *Releases) Create(key string, rls *rspb.Release) error

Create creates a new object holding the release. If the object already exists, ErrReleaseExists is returned.

func (*Releases) Delete

func (rel *Releases) Delete(key string) (rls *rspb.Release, err error)

Delete deletes the object holding the release named by key.

func (*Releases) Get

func (rel *Releases) Get(key string) (*rspb.Release, error)

Get fetches the release named by key. The corresponding release is returned or error if not found.

func (*Releases) List

func (rel *Releases) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error)

List fetches all releases and returns the list releases such that filter(release) == true. An error is returned if the object fails to retrieve the releases.

func (*Releases) Name

func (rel *Releases) Name() string

Name returns the name of the driver.

func (*Releases) Query

func (rel *Releases) Query(labels map[string]string) ([]*rspb.Release, error)

Query fetches all releases that match the provided map of labels. An error is returned if the object fails to retrieve the releases.

func (*Releases) Update

func (rel *Releases) Update(key string, rls *rspb.Release) error

Update updates the object holding the release. If not found the object is created to hold the release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL