Documentation ¶
Index ¶
- Variables
- func GetInstanceIdFromFile(filepath string) (instanceId string, err error)
- func GetRequiredVolumeSizeByte(capRange *csi.CapacityRange) (int64, error)
- func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
- func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
- func Run(option *Option, storageProvider storage.Provider, endpoint string)
- type NonBlockingGRPCServer
- type Option
- func (o *Option) SetControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) *Option
- func (o *Option) SetMaxVolume(maxVolume int64) *Option
- func (o *Option) SetName(name string) *Option
- func (o *Option) SetNodeId(nodeId string) *Option
- func (o *Option) SetNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) *Option
- func (o *Option) SetPluginCapabilities(cap []*csi.PluginCapability) *Option
- func (o *Option) SetRetryTime(retryTime wait.Backoff) *Option
- func (o *Option) SetVersion(version string) *Option
- func (o *Option) SetVolumeCapabilityAccessNodes(vc []csi.VolumeCapability_AccessMode_Mode) *Option
- func (o *Option) ValidateVolumeAccessMode(c csi.VolumeCapability_AccessMode_Mode) bool
- func (o *Option) ValidateVolumeCapabilities(caps []*csi.VolumeCapability) bool
- func (o *Option) ValidateVolumeCapability(cap *csi.VolumeCapability) bool
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultBackOff = wait.Backoff{ Duration: time.Second, Factor: 1.5, Steps: 20, Cap: time.Minute * 2, } )
View Source
var DefaultControllerServiceCapability = []csi.ControllerServiceCapability_RPC_Type{ csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, csi.ControllerServiceCapability_RPC_CLONE_VOLUME, }
View Source
var DefaultNodeServiceCapability = []csi.NodeServiceCapability_RPC_Type{ csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME, csi.NodeServiceCapability_RPC_EXPAND_VOLUME, csi.NodeServiceCapability_RPC_GET_VOLUME_STATS, }
View Source
var DefaultPluginCapability = []*csi.PluginCapability{ { Type: &csi.PluginCapability_Service_{ Service: &csi.PluginCapability_Service{ Type: csi.PluginCapability_Service_CONTROLLER_SERVICE, }, }, }, { Type: &csi.PluginCapability_VolumeExpansion_{ VolumeExpansion: &csi.PluginCapability_VolumeExpansion{ Type: csi.PluginCapability_VolumeExpansion_OFFLINE, }, }, }, }
View Source
var DefaultVolumeAccessModeType = []csi.VolumeCapability_AccessMode_Mode{ csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER, }
Functions ¶
func GetInstanceIdFromFile ¶
func GetRequiredVolumeSizeByte ¶
func GetRequiredVolumeSizeByte(capRange *csi.CapacityRange) (int64, error)
Required Volume Size
func NewControllerServiceCapability ¶
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
func NewNodeServiceCapability ¶
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
Types ¶
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, service Service) // 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
type Option ¶
type Option struct { Name string Version string NodeId string MaxVolume int64 VolumeCap []*csi.VolumeCapability_AccessMode ControllerCap []*csi.ControllerServiceCapability NodeCap []*csi.NodeServiceCapability NodeCapType []csi.NodeServiceCapability_RPC_Type PluginCap []*csi.PluginCapability RetryTime wait.Backoff }
func (*Option) SetControllerServiceCapabilities ¶
func (o *Option) SetControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) *Option
func (*Option) SetMaxVolume ¶
func (*Option) SetNodeServiceCapabilities ¶
func (o *Option) SetNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) *Option
func (*Option) SetPluginCapabilities ¶
func (o *Option) SetPluginCapabilities(cap []*csi.PluginCapability) *Option
func (*Option) SetVersion ¶
func (*Option) SetVolumeCapabilityAccessNodes ¶
func (o *Option) SetVolumeCapabilityAccessNodes(vc []csi.VolumeCapability_AccessMode_Mode) *Option
func (*Option) ValidateVolumeAccessMode ¶
func (o *Option) ValidateVolumeAccessMode(c csi.VolumeCapability_AccessMode_Mode) bool
func (*Option) ValidateVolumeCapabilities ¶
func (o *Option) ValidateVolumeCapabilities(caps []*csi.VolumeCapability) bool
func (*Option) ValidateVolumeCapability ¶
func (o *Option) ValidateVolumeCapability(cap *csi.VolumeCapability) bool
type Service ¶
type Service interface { csi.ControllerServer csi.IdentityServer csi.NodeServer Interceptor() grpc.UnaryServerInterceptor }
Click to show internal directories.
Click to hide internal directories.