Documentation ¶
Index ¶
- Constants
- func GetVersionJSON() (string, error)
- func MountS3Path() string
- func ParseEndpoint(endpoint string) (string, string, error)
- func ReplaceFile(destPath string, sourcePath string, perm fs.FileMode) error
- type Driver
- func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d *Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (d *Driver) ControllerModifyVolume(context.Context, *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run() error
- func (d *Driver) Stop()
- func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type FakeMounter
- type Fs
- type MountCredentials
- type MountLister
- type Mounter
- type OsFs
- type ProcMountLister
- type S3Mounter
- type S3NodeServer
- func (ns *S3NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *S3NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *S3NodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *S3NodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *S3NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *S3NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *S3NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *S3NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type ServiceRunner
- type Token
- type VersionInfo
Constants ¶
View Source
const (
GiB = 1024 * 1024 * 1024
)
View Source
const (
MountS3PathEnv = "MOUNT_S3_PATH"
)
Variables ¶
This section is empty.
Functions ¶
func GetVersionJSON ¶
func MountS3Path ¶
func MountS3Path() string
Types ¶
type Driver ¶
type Driver struct { Endpoint string Srv *grpc.Server NodeID string NodeServer *S3NodeServer }
func (*Driver) ControllerExpandVolume ¶
func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*Driver) ControllerGetCapabilities ¶
func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
func (*Driver) ControllerGetVolume ¶
func (d *Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
func (*Driver) ControllerModifyVolume ¶
func (d *Driver) ControllerModifyVolume(context.Context, *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
func (*Driver) ControllerPublishVolume ¶
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*Driver) ControllerUnpublishVolume ¶
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*Driver) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*Driver) GetCapacity ¶
func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*Driver) GetPluginCapabilities ¶
func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*Driver) GetPluginInfo ¶
func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
func (*Driver) ListSnapshots ¶
func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*Driver) ListVolumes ¶
func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*Driver) Probe ¶
func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
func (*Driver) ValidateVolumeCapabilities ¶
func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type FakeMounter ¶ added in v1.4.0
type FakeMounter struct{}
func (*FakeMounter) IsMountPoint ¶ added in v1.4.0
func (m *FakeMounter) IsMountPoint(target string) (bool, error)
func (*FakeMounter) Mount ¶ added in v1.4.0
func (m *FakeMounter) Mount(bucketName string, target string, credentials *MountCredentials, options []string) error
func (*FakeMounter) Unmount ¶ added in v1.4.0
func (m *FakeMounter) Unmount(target string) error
type MountCredentials ¶ added in v1.4.0
type MountCredentials struct { AccessKeyID string SecretAccessKey string Region string DefaultRegion string WebTokenPath string StsEndpoints string AwsRoleArn string }
func (*MountCredentials) Env ¶ added in v1.4.0
func (mc *MountCredentials) Env() []string
Get environment variables to pass to mount-s3 for authentication.
type MountLister ¶ added in v1.4.0
type MountLister interface {
ListMounts() ([]mount.MountPoint, error)
}
type Mounter ¶
type Mounter interface { Mount(bucketName string, target string, credentials *MountCredentials, options []string) error Unmount(target string) error IsMountPoint(target string) (bool, error) }
Mounter is an interface for mount operations
type ProcMountLister ¶ added in v1.4.0
type ProcMountLister struct {
ProcMountPath string
}
func (*ProcMountLister) ListMounts ¶ added in v1.4.0
func (pml *ProcMountLister) ListMounts() ([]mount.MountPoint, error)
type S3Mounter ¶
type S3Mounter struct { Ctx context.Context Runner ServiceRunner Fs Fs MountLister MountLister MpVersion string MountS3Path string }
func NewS3Mounter ¶
func (*S3Mounter) Mount ¶
func (m *S3Mounter) Mount(bucketName string, target string, credentials *MountCredentials, options []string) error
Mount the given bucket at the target path. Options will be passed through mostly unchanged, with the exception of the user agent prefix which will be added to the Mountpoint headers. This method will create the target path if it does not exist and if there is an existing corrupt mount, it will attempt an unmount before attempting the mount.
type S3NodeServer ¶ added in v1.4.0
type S3NodeServer struct { NodeID string BaseCredentials *MountCredentials Mounter Mounter }
S3NodeServer is the implementation of the csi.NodeServer interface
func (*S3NodeServer) NodeExpandVolume ¶ added in v1.4.0
func (ns *S3NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*S3NodeServer) NodeGetCapabilities ¶ added in v1.4.0
func (ns *S3NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*S3NodeServer) NodeGetInfo ¶ added in v1.4.0
func (ns *S3NodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*S3NodeServer) NodeGetVolumeStats ¶ added in v1.4.0
func (ns *S3NodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*S3NodeServer) NodePublishVolume ¶ added in v1.4.0
func (ns *S3NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*S3NodeServer) NodeStageVolume ¶ added in v1.4.0
func (ns *S3NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*S3NodeServer) NodeUnpublishVolume ¶ added in v1.4.0
func (ns *S3NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*S3NodeServer) NodeUnstageVolume ¶ added in v1.4.0
func (ns *S3NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
type ServiceRunner ¶ added in v1.4.0
type VersionInfo ¶
type VersionInfo struct { DriverVersion string `json:"driverVersion"` GitCommit string `json:"gitCommit"` BuildDate string `json:"buildDate"` GoVersion string `json:"goVersion"` Compiler string `json:"compiler"` Platform string `json:"platform"` }
func GetVersion ¶
func GetVersion() VersionInfo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.