Documentation ¶
Index ¶
- Constants
- Variables
- type CreateOpts
- type IdempotentService
- func (s *IdempotentService) Attach(ctx context.Context, volume *csi.Volume, server *csi.Server) error
- func (s *IdempotentService) Create(ctx context.Context, opts CreateOpts) (*csi.Volume, error)
- func (s *IdempotentService) Delete(ctx context.Context, volume *csi.Volume) error
- func (s *IdempotentService) Detach(ctx context.Context, volume *csi.Volume, server *csi.Server) error
- func (s *IdempotentService) GetByID(ctx context.Context, id uint64) (*csi.Volume, error)
- func (s *IdempotentService) GetByName(ctx context.Context, name string) (*csi.Volume, error)
- func (s *IdempotentService) Resize(ctx context.Context, volume *csi.Volume, size int) error
- type LinuxMountService
- func (s *LinuxMountService) PathExists(path string) (bool, error)
- func (s *LinuxMountService) Publish(volume *csi.Volume, targetPath string, stagingTargetPath string, ...) error
- func (s *LinuxMountService) Stage(volume *csi.Volume, stagingTargetPath string, opts MountOpts) error
- func (s *LinuxMountService) Unpublish(volume *csi.Volume, targetPath string) error
- func (s *LinuxMountService) Unstage(volume *csi.Volume, stagingTargetPath string) error
- type LinuxResizeService
- type LinuxStatsService
- type MountOpts
- type MountService
- type ResizeService
- type Service
- type StatsService
Constants ¶
View Source
const DefaultFSType = "ext4"
Variables ¶
View Source
var ( ErrVolumeNotFound = errors.New("volume not found") ErrVolumeAlreadyExists = errors.New("volume does already exist") ErrServerNotFound = errors.New("server not found") ErrAttached = errors.New("volume is attached") ErrNotAttached = errors.New("volume is not attached") ErrAttachLimitReached = errors.New("max number of attachments per server reached") ErrLockedServer = errors.New("server is locked") )
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
CreateOpts specifies the options for creating a volume.
type IdempotentService ¶
type IdempotentService struct {
// contains filtered or unexported fields
}
IdempotentService wraps a volume service and provides idempotency as required by the CSI spec.
func NewIdempotentService ¶
func NewIdempotentService(logger log.Logger, volumeService Service) *IdempotentService
func (*IdempotentService) Create ¶
func (s *IdempotentService) Create(ctx context.Context, opts CreateOpts) (*csi.Volume, error)
type LinuxMountService ¶
type LinuxMountService struct {
// contains filtered or unexported fields
}
LinuxMountService mounts volumes on a Linux system.
func NewLinuxMountService ¶
func NewLinuxMountService(logger log.Logger) *LinuxMountService
func (*LinuxMountService) PathExists ¶
func (s *LinuxMountService) PathExists(path string) (bool, error)
type LinuxResizeService ¶
type LinuxResizeService struct {
// contains filtered or unexported fields
}
LinuxResizeService resizes volumes on a Linux system.
func NewLinuxResizeService ¶
func NewLinuxResizeService(logger log.Logger) *LinuxResizeService
type LinuxStatsService ¶
type LinuxStatsService struct {
// contains filtered or unexported fields
}
LinuxStatsService mounts volumes on a Linux system.
func NewLinuxStatsService ¶
func NewLinuxStatsService(logger log.Logger) *LinuxStatsService
func (*LinuxStatsService) ByteFilesystemStats ¶
func (*LinuxStatsService) INodeFilesystemStats ¶
type MountOpts ¶
type MountOpts struct { BlockVolume bool FSType string Readonly bool Additional []string // Additional mount options/flags passed to /bin/mount }
MountOpts specifies options for mounting a volume.
type MountService ¶
type MountService interface { Stage(volume *csi.Volume, stagingTargetPath string, opts MountOpts) error Unstage(volume *csi.Volume, stagingTargetPath string) error Publish(volume *csi.Volume, targetPath string, stagingTargetPath string, opts MountOpts) error Unpublish(volume *csi.Volume, targetPath string) error PathExists(path string) (bool, error) }
MountService mounts volumes.
type ResizeService ¶
ResizeService resizes volumes.
type Service ¶
type Service interface { Create(ctx context.Context, opts CreateOpts) (*csi.Volume, error) GetByID(ctx context.Context, id uint64) (*csi.Volume, error) GetByName(ctx context.Context, name string) (*csi.Volume, error) Delete(ctx context.Context, volume *csi.Volume) error Attach(ctx context.Context, volume *csi.Volume, server *csi.Server) error Detach(ctx context.Context, volume *csi.Volume, server *csi.Server) error Resize(ctx context.Context, volume *csi.Volume, size int) error }
Click to show internal directories.
Click to hide internal directories.