Documentation ¶
Index ¶
- Constants
- Variables
- type ConfigMaps
- func (cfgmaps *ConfigMaps) Create(key string, rls *rspb.Release) error
- func (cfgmaps *ConfigMaps) Delete(key string) (rls *rspb.Release, err error)
- func (cfgmaps *ConfigMaps) Get(key string) (*rspb.Release, error)
- func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error)
- func (cfgmaps *ConfigMaps) Name() string
- func (cfgmaps *ConfigMaps) Query(labels map[string]string) ([]*rspb.Release, error)
- func (cfgmaps *ConfigMaps) Update(key string, rls *rspb.Release) error
- type Creator
- type Deletor
- type Driver
- type Memory
- func (mem *Memory) Create(key string, rls *rspb.Release) error
- func (mem *Memory) Delete(key string) (*rspb.Release, error)
- func (mem *Memory) Get(key string) (*rspb.Release, error)
- func (mem *Memory) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error)
- func (mem *Memory) Name() string
- func (mem *Memory) Query(keyvals map[string]string) ([]*rspb.Release, error)
- func (mem *Memory) Update(key string, rls *rspb.Release) error
- type MockConfigMapsInterface
- func (mock *MockConfigMapsInterface) Create(cfgmap *api.ConfigMap) (*api.ConfigMap, error)
- func (mock *MockConfigMapsInterface) Delete(name string) error
- func (mock *MockConfigMapsInterface) Get(name string) (*api.ConfigMap, error)
- func (mock *MockConfigMapsInterface) Init(t *testing.T, releases ...*rspb.Release)
- func (mock *MockConfigMapsInterface) List(opts api.ListOptions) (*api.ConfigMapList, error)
- func (mock *MockConfigMapsInterface) Update(cfgmap *api.ConfigMap) (*api.ConfigMap, error)
- type Queryor
- type Updator
Constants ¶
const ConfigMapsDriverName = "ConfigMap"
ConfigMapsDriverName is the string name of the driver.
const MemoryDriverName = "Memory"
MemoryDriverName is the string name of this driver.
Variables ¶
var ( // ErrReleaseNotFound indicates that a release is not found. ErrReleaseNotFound = errors.New("release: not found") // ErrReleaseExists indicates that a release already exists. ErrReleaseExists = errors.New("release: already exists") // ErrInvalidKey indicates that a release key could not be parsed. ErrInvalidKey = errors.New("release: invalid key") )
Functions ¶
This section is empty.
Types ¶
type ConfigMaps ¶
type ConfigMaps struct {
// contains filtered or unexported fields
}
ConfigMaps is a wrapper around an implementation of a kubernetes ConfigMapsInterface.
func NewConfigMaps ¶
func NewConfigMaps(impl client.ConfigMapsInterface) *ConfigMaps
NewConfigMaps initializes a new ConfigMaps wrapping an implmenetation of the kubernetes ConfigMapsInterface.
func (*ConfigMaps) Create ¶
func (cfgmaps *ConfigMaps) Create(key string, rls *rspb.Release) error
Create creates a new ConfigMap holding the release. If the ConfigMap already exists, ErrReleaseExists is returned.
func (*ConfigMaps) Delete ¶
func (cfgmaps *ConfigMaps) Delete(key string) (rls *rspb.Release, err error)
Delete deletes the ConfigMap holding the release named by key.
func (*ConfigMaps) Get ¶
func (cfgmaps *ConfigMaps) Get(key string) (*rspb.Release, error)
Get fetches the release named by key. The corresponding release is returned or error if not found.
func (*ConfigMaps) List ¶
List fetches all releases and returns the list releases such that filter(release) == true. An error is returned if the configmap fails to retrieve the releases.
func (*ConfigMaps) Name ¶
func (cfgmaps *ConfigMaps) Name() string
Name returns the name of the driver.
type Creator ¶
Creator is the interface that wraps the Create method.
Create stores the release or returns ErrReleaseExists if an identical release already exists.
type Deletor ¶
Deletor is the interface that wraps the Delete method.
Delete deletes the release named by key or returns ErrReleaseNotFound if the release does not exist.
type Driver ¶
Driver is the interface composed of Creator, Updator, Deletor, Queryor interfaces. It defines the behavior for storing, updating, deleted, and retrieving tiller releases from some underlying storage mechanism, e.g. memory, configmaps.
type Memory ¶
Memory is the in-memory storage driver implementation.
type MockConfigMapsInterface ¶
type MockConfigMapsInterface struct { unversioned.ConfigMapsInterface // contains filtered or unexported fields }
MockConfigMapsInterface mocks a kubernetes ConfigMapsInterface
func (*MockConfigMapsInterface) Delete ¶
func (mock *MockConfigMapsInterface) Delete(name string) error
Delete deletes a ConfigMap by name.
func (*MockConfigMapsInterface) Get ¶
func (mock *MockConfigMapsInterface) Get(name string) (*api.ConfigMap, error)
Get returns the ConfigMap by name.
func (*MockConfigMapsInterface) Init ¶
func (mock *MockConfigMapsInterface) Init(t *testing.T, releases ...*rspb.Release)
Init initializes the MockConfigMapsInterface with the set of releases.
func (*MockConfigMapsInterface) List ¶
func (mock *MockConfigMapsInterface) List(opts api.ListOptions) (*api.ConfigMapList, error)
List returns the a of ConfigMaps.
type Queryor ¶
type Queryor interface { Get(key string) (*rspb.Release, error) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) Query(labels map[string]string) ([]*rspb.Release, error) }
Queryor is the interface that wraps the Get and List methods.
Get returns the release named by key or returns ErrReleaseNotFound if the release does not exist.
List returns the set of all releases that satisfy the filter predicate.
Query returns the set of all releases that match the provided label set.