attachment

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package attachment to manage Kubernetes storage attach events.

Index

Constants

View Source
const (
	CustomResourceName       = "volume"
	CustomResourceNamePlural = "volumes"
)

Variables

VolumeResource represents the Volume custom resource object

Functions

This section is empty.

Types

type Attachment

type Attachment interface {
	Create(volumeAttachment *rookalpha.Volume) error
	Get(namespace, name string) (*rookalpha.Volume, error)
	List(namespace string) (*rookalpha.VolumeList, error)
	Update(volumeAttachment *rookalpha.Volume) error
	Delete(namespace, name string) error
}

Attachment handles custom resource Volume storage operations.

func New

func New(context *clusterd.Context) (Attachment, error)

CreateController creates a new controller for volume attachment

type MockAttachment

type MockAttachment struct {
	MockCreate func(volumeAttachment *rookalpha.Volume) error
	MockGet    func(namespace, name string) (*rookalpha.Volume, error)
	MockList   func(namespace string) (*rookalpha.VolumeList, error)
	MockUpdate func(volumeAttachment *rookalpha.Volume) error
	MockDelete func(namespace, name string) error
}

func (*MockAttachment) Create

func (m *MockAttachment) Create(volumeAttachment *rookalpha.Volume) error

func (*MockAttachment) Delete

func (m *MockAttachment) Delete(namespace, name string) error

func (*MockAttachment) Get

func (m *MockAttachment) Get(namespace, name string) (*rookalpha.Volume, error)

func (*MockAttachment) List

func (m *MockAttachment) List(namespace string) (*rookalpha.VolumeList, error)

func (*MockAttachment) Update

func (m *MockAttachment) Update(volumeAttachment *rookalpha.Volume) error

Jump to

Keyboard shortcuts

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