volume

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ListVolumesOnDisk(diskID string) (volumeIDs []string, err error)
	// MountVolume mounts the volume at the requested global staging path
	MountVolume(volumeID, path string) error
	// DismountVolume gracefully dismounts a volume
	DismountVolume(volumeID, path string) error
	// IsVolumeFormatted checks if a volume is formatted with NTFS
	IsVolumeFormatted(volumeID string) (bool, error)
	// FormatVolume formats a volume with the provided file system
	FormatVolume(volumeID string) error
	// ResizeVolume performs resizing of the partition and file system for a block based volume
	ResizeVolume(volumeID string, size int64) error
	// VolumeStats gets the volume information
	VolumeStats(volumeID string) (int64, int64, error)
	// GetVolumeDiskNumber returns the disk number for where the volume is at
	GetVolumeDiskNumber(volumeID string) (int64, error)
	// GetVolumeIDFromMount returns the volume id of a given mount
	GetVolumeIDFromMount(mount string) (string, error)
	// WriteVolumeCache writes volume cache to disk
	WriteVolumeCache(volumeID string) error
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(hostAPI API) (*Server, error)

func (*Server) DismountVolume

func (s *Server) DismountVolume(context context.Context, request *internal.DismountVolumeRequest, version apiversion.Version) (*internal.DismountVolumeResponse, error)

func (*Server) FormatVolume

func (s *Server) FormatVolume(context context.Context, request *internal.FormatVolumeRequest, version apiversion.Version) (*internal.FormatVolumeResponse, error)

func (*Server) GetVolumeDiskNumber added in v0.2.0

func (s *Server) GetVolumeDiskNumber(context context.Context, request *internal.VolumeDiskNumberRequest, version apiversion.Version) (*internal.VolumeDiskNumberResponse, error)

func (*Server) GetVolumeIDFromMount added in v0.2.0

func (s *Server) GetVolumeIDFromMount(context context.Context, request *internal.VolumeIDFromMountRequest, version apiversion.Version) (*internal.VolumeIDFromMountResponse, error)

func (*Server) IsVolumeFormatted

func (*Server) ListVolumesOnDisk

func (*Server) MountVolume

func (s *Server) MountVolume(context context.Context, request *internal.MountVolumeRequest, version apiversion.Version) (*internal.MountVolumeResponse, error)

func (*Server) ResizeVolume

func (s *Server) ResizeVolume(context context.Context, request *internal.ResizeVolumeRequest, version apiversion.Version) (*internal.ResizeVolumeResponse, error)

func (*Server) VersionedAPIs

func (s *Server) VersionedAPIs() []*srvtypes.VersionedAPI

func (*Server) VolumeStats added in v0.2.0

func (s *Server) VolumeStats(context context.Context, request *internal.VolumeStatsRequest, version apiversion.Version) (*internal.VolumeStatsResponse, error)

func (*Server) WriteVolumeCache added in v0.2.2

func (s *Server) WriteVolumeCache(context context.Context, request *internal.WriteVolumeCacheRequest, version apiversion.Version) (*internal.WriteVolumeCacheResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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