Documentation ¶
Index ¶
- Constants
- Variables
- func CodeForError(err error) *codes.Code
- func LoggedError(msg string, err error) error
- func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
- func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
- func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
- type GCEControllerServer
- func (gceCS *GCEControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (gceCS *GCEControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (gceCS *GCEControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (gceCS *GCEControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (gceCS *GCEControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (gceCS *GCEControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (gceCS *GCEControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (gceCS *GCEControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (gceCS *GCEControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type GCEDriver
- func (gceDriver *GCEDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error
- func (gceDriver *GCEDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
- func (gceDriver *GCEDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error
- func (gceDriver *GCEDriver) Run(endpoint string, grpcLogCharCap int)
- func (gceDriver *GCEDriver) SetupGCEDriver(name, vendorVersion string, extraVolumeLabels map[string]string, ...) error
- func (gceDriver *GCEDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
- type GCEIdentityServer
- func (gceIdentity *GCEIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (gceIdentity *GCEIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (gceIdentity *GCEIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type GCENodeServer
- func (ns *GCENodeServer) GetVolumeLimits() (int64, error)
- func (ns *GCENodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *GCENodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *GCENodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *GCENodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *GCENodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *GCENodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *GCENodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type NonBlockingGRPCServer
Constants ¶
const ( // MaxVolumeSizeInBytes is the maximum standard and ssd size of 64TB MaxVolumeSizeInBytes int64 = 64 * 1024 * 1024 * 1024 * 1024 MinimumVolumeSizeInBytes int64 = 1 * 1024 * 1024 * 1024 MinimumDiskSizeInGb = 1 )
Variables ¶
var ProbeCSIFullMethod = "/csi.v1.Identity/Probe"
Functions ¶
func CodeForError ¶ added in v1.7.8
CodeForError returns a pointer to the grpc error code that maps to the http error code for the passed in user googleapi error. Returns codes.Internal if the given error is not a googleapi error caused by the user. The following http error codes are considered user errors: (1) http 400 Bad Request, returns grpc InvalidArgument, (2) http 403 Forbidden, returns grpc PermissionDenied, (3) http 404 Not Found, returns grpc NotFound (4) http 429 Too Many Requests, returns grpc ResourceExhausted
func LoggedError ¶ added in v1.7.8
func NewControllerServiceCapability ¶
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
func NewNodeServiceCapability ¶
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
func NewVolumeCapabilityAccessMode ¶
func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
Types ¶
type GCEControllerServer ¶
type GCEControllerServer struct { Driver *GCEDriver CloudProvider gce.GCECompute // contains filtered or unexported fields }
func NewControllerServer ¶
func NewControllerServer(gceDriver *GCEDriver, cloudProvider gce.GCECompute, errorBackoffInitialDuration, errorBackoffMaxDuration time.Duration) *GCEControllerServer
func (*GCEControllerServer) ControllerExpandVolume ¶ added in v0.4.0
func (gceCS *GCEControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*GCEControllerServer) ControllerGetCapabilities ¶
func (gceCS *GCEControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements the default GRPC callout.
func (*GCEControllerServer) ControllerGetVolume ¶ added in v1.4.0
func (gceCS *GCEControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
TODO(#809): Implement logic and advertise related capabilities.
func (*GCEControllerServer) ControllerPublishVolume ¶
func (gceCS *GCEControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*GCEControllerServer) ControllerUnpublishVolume ¶
func (gceCS *GCEControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*GCEControllerServer) CreateSnapshot ¶
func (gceCS *GCEControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*GCEControllerServer) CreateVolume ¶
func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*GCEControllerServer) DeleteSnapshot ¶
func (gceCS *GCEControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*GCEControllerServer) DeleteVolume ¶
func (gceCS *GCEControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*GCEControllerServer) GetCapacity ¶
func (gceCS *GCEControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*GCEControllerServer) ListSnapshots ¶
func (gceCS *GCEControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*GCEControllerServer) ListVolumes ¶
func (gceCS *GCEControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*GCEControllerServer) ValidateVolumeCapabilities ¶
func (gceCS *GCEControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type GCEDriver ¶
type GCEDriver struct {
// contains filtered or unexported fields
}
func GetGCEDriver ¶
func GetGCEDriver() *GCEDriver
func (*GCEDriver) AddControllerServiceCapabilities ¶
func (gceDriver *GCEDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error
func (*GCEDriver) AddNodeServiceCapabilities ¶
func (gceDriver *GCEDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
func (*GCEDriver) AddVolumeCapabilityAccessModes ¶
func (gceDriver *GCEDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error
func (*GCEDriver) SetupGCEDriver ¶
func (gceDriver *GCEDriver) SetupGCEDriver(name, vendorVersion string, extraVolumeLabels map[string]string, identityServer *GCEIdentityServer, controllerServer *GCEControllerServer, nodeServer *GCENodeServer) error
func (*GCEDriver) ValidateControllerServiceRequest ¶
func (gceDriver *GCEDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
type GCEIdentityServer ¶
type GCEIdentityServer struct {
Driver *GCEDriver
}
func NewIdentityServer ¶
func NewIdentityServer(gceDriver *GCEDriver) *GCEIdentityServer
func (*GCEIdentityServer) GetPluginCapabilities ¶
func (gceIdentity *GCEIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*GCEIdentityServer) GetPluginInfo ¶
func (gceIdentity *GCEIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error)
func (*GCEIdentityServer) Probe ¶
func (gceIdentity *GCEIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type GCENodeServer ¶
type GCENodeServer struct { Driver *GCEDriver Mounter *mount.SafeFormatAndMount DeviceUtils mountmanager.DeviceUtils VolumeStatter mountmanager.Statter MetadataService metadataservice.MetadataService // contains filtered or unexported fields }
func NewNodeServer ¶
func NewNodeServer(gceDriver *GCEDriver, mounter *mount.SafeFormatAndMount, deviceUtils mountmanager.DeviceUtils, meta metadataservice.MetadataService, statter mountmanager.Statter) *GCENodeServer
func (*GCENodeServer) GetVolumeLimits ¶ added in v0.5.0
func (ns *GCENodeServer) GetVolumeLimits() (int64, error)
func (*GCENodeServer) NodeExpandVolume ¶ added in v0.4.0
func (ns *GCENodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*GCENodeServer) NodeGetCapabilities ¶
func (ns *GCENodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*GCENodeServer) NodeGetInfo ¶
func (ns *GCENodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*GCENodeServer) NodeGetVolumeStats ¶ added in v0.3.0
func (ns *GCENodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*GCENodeServer) NodePublishVolume ¶
func (ns *GCENodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*GCENodeServer) NodeStageVolume ¶
func (ns *GCENodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*GCENodeServer) NodeUnpublishVolume ¶
func (ns *GCENodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*GCENodeServer) NodeUnstageVolume ¶
func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer