gceGCEDriver

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 33 Imported by: 1

Documentation

Index

Constants

View Source
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

View Source
var ProbeCSIFullMethod = "/csi.v1.Identity/Probe"

Functions

func CodeForError added in v1.7.8

func CodeForError(err error) *codes.Code

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 LoggedError(msg string, err error) error

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 (*GCEControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout.

func (*GCEControllerServer) ControllerGetVolume added in v1.4.0

TODO(#809): Implement logic and advertise related capabilities.

func (*GCEControllerServer) ControllerPublishVolume

func (*GCEControllerServer) ControllerUnpublishVolume

func (*GCEControllerServer) CreateSnapshot

func (*GCEControllerServer) CreateVolume

func (*GCEControllerServer) DeleteSnapshot

func (*GCEControllerServer) DeleteVolume

func (*GCEControllerServer) GetCapacity

func (*GCEControllerServer) ListSnapshots

func (*GCEControllerServer) ListVolumes

func (*GCEControllerServer) ValidateVolumeCapabilities

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) Run

func (gceDriver *GCEDriver) Run(endpoint string, grpcLogCharCap int)

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 (*GCENodeServer) NodeGetCapabilities

func (*GCENodeServer) NodeGetInfo

func (*GCENodeServer) NodeGetVolumeStats added in v0.3.0

func (*GCENodeServer) NodePublishVolume

func (*GCENodeServer) NodeStageVolume

func (*GCENodeServer) NodeUnpublishVolume

func (*GCENodeServer) NodeUnstageVolume

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

Jump to

Keyboard shortcuts

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