Documentation ¶
Index ¶
- Constants
- type CSIVolume
- type Closer
- type ControllerClient
- func (f *ControllerClient) ControllerGetCapabilities(ctx context.Context, in *csipb.ControllerGetCapabilitiesRequest, ...) (*csipb.ControllerGetCapabilitiesResponse, error)
- func (f *ControllerClient) ControllerPublishVolume(ctx context.Context, in *csipb.ControllerPublishVolumeRequest, ...) (*csipb.ControllerPublishVolumeResponse, error)
- func (f *ControllerClient) ControllerUnpublishVolume(ctx context.Context, in *csipb.ControllerUnpublishVolumeRequest, ...) (*csipb.ControllerUnpublishVolumeResponse, error)
- func (f *ControllerClient) CreateVolume(ctx context.Context, in *csipb.CreateVolumeRequest, opts ...grpc.CallOption) (*csipb.CreateVolumeResponse, error)
- func (f *ControllerClient) DeleteVolume(ctx context.Context, in *csipb.DeleteVolumeRequest, opts ...grpc.CallOption) (*csipb.DeleteVolumeResponse, error)
- func (f *ControllerClient) GetCapacity(ctx context.Context, in *csipb.GetCapacityRequest, opts ...grpc.CallOption) (*csipb.GetCapacityResponse, error)
- func (f *ControllerClient) ListVolumes(ctx context.Context, in *csipb.ListVolumesRequest, opts ...grpc.CallOption) (*csipb.ListVolumesResponse, error)
- func (f *ControllerClient) SetNextCapabilities(caps []*csipb.ControllerServiceCapability)
- func (f *ControllerClient) SetNextError(err error)
- func (f *ControllerClient) ValidateVolumeCapabilities(ctx context.Context, in *csipb.ValidateVolumeCapabilitiesRequest, ...) (*csipb.ValidateVolumeCapabilitiesResponse, error)
- type IdentityClient
- func (f *IdentityClient) GetPluginCapabilities(ctx context.Context, in *csipb.GetPluginCapabilitiesRequest, ...) (*csipb.GetPluginCapabilitiesResponse, error)
- func (f *IdentityClient) GetPluginInfo(ctx context.Context, in *csipb.GetPluginInfoRequest, opts ...grpc.CallOption) (*csipb.GetPluginInfoResponse, error)
- func (f *IdentityClient) Probe(ctx context.Context, in *csipb.ProbeRequest, opts ...grpc.CallOption) (*csipb.ProbeResponse, error)
- func (f *IdentityClient) SetNextError(err error)
- type NodeClient
- func NewNodeClient(stageUnstageSet bool) *NodeClient
- func NewNodeClientWithExpansion(stageUnstageSet bool, expansionSet bool) *NodeClient
- func NewNodeClientWithSingleNodeMultiWriter(singleNodeMultiWriterSet bool) *NodeClient
- func NewNodeClientWithVolumeMountGroup(stageUnstageSet, volumeMountGroupSet bool) *NodeClient
- func NewNodeClientWithVolumeStats(volumeStatsSet bool) *NodeClient
- func NewNodeClientWithVolumeStatsAndCondition(volumeStatsSet, volumeConditionSet bool) *NodeClient
- func (f *NodeClient) AddNodePublishedVolume(volID, deviceMountPath string, volumeContext map[string]string)
- func (f *NodeClient) AddNodeStagedVolume(volID, deviceMountPath string, volumeContext map[string]string)
- func (f *NodeClient) GetNodePublishedVolumes() map[string]CSIVolume
- func (f *NodeClient) GetNodeStagedVolumes() map[string]CSIVolume
- func (f *NodeClient) NodeExpandVolume(ctx context.Context, req *csipb.NodeExpandVolumeRequest, ...) (*csipb.NodeExpandVolumeResponse, error)
- func (f *NodeClient) NodeGetCapabilities(ctx context.Context, in *csipb.NodeGetCapabilitiesRequest, ...) (*csipb.NodeGetCapabilitiesResponse, error)
- func (f *NodeClient) NodeGetInfo(ctx context.Context, in *csipb.NodeGetInfoRequest, opts ...grpc.CallOption) (*csipb.NodeGetInfoResponse, error)
- func (f *NodeClient) NodeGetVolumeStats(ctx context.Context, req *csipb.NodeGetVolumeStatsRequest, ...) (*csipb.NodeGetVolumeStatsResponse, error)
- func (f *NodeClient) NodePublishVolume(ctx context.Context, req *csipb.NodePublishVolumeRequest, ...) (*csipb.NodePublishVolumeResponse, error)
- func (f *NodeClient) NodeStageVolume(ctx context.Context, req *csipb.NodeStageVolumeRequest, ...) (*csipb.NodeStageVolumeResponse, error)
- func (f *NodeClient) NodeUnpublishVolume(ctx context.Context, req *csipb.NodeUnpublishVolumeRequest, ...) (*csipb.NodeUnpublishVolumeResponse, error)
- func (f *NodeClient) NodeUnstageVolume(ctx context.Context, req *csipb.NodeUnstageVolumeRequest, ...) (*csipb.NodeUnstageVolumeResponse, error)
- func (f *NodeClient) SetNextError(err error)
- func (f *NodeClient) SetNodeGetInfoResp(resp *csipb.NodeGetInfoResponse)
- func (f *NodeClient) SetNodeVolumeStatsResp(resp *csipb.NodeGetVolumeStatsResponse)
Constants ¶
const ( // NodePublishTimeOut_VolumeID is volume id that will result in NodePublish operation to timeout NodePublishTimeOut_VolumeID = "node-publish-timeout" // NodeStageTimeOut_VolumeID is a volume id that will result in NodeStage operation to timeout NodeStageTimeOut_VolumeID = "node-stage-timeout" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerClient ¶
type ControllerClient struct {
// contains filtered or unexported fields
}
ControllerClient represents a CSI Controller client
func NewControllerClient ¶
func NewControllerClient() *ControllerClient
NewControllerClient returns a ControllerClient
func (*ControllerClient) ControllerGetCapabilities ¶
func (f *ControllerClient) ControllerGetCapabilities(ctx context.Context, in *csipb.ControllerGetCapabilitiesRequest, opts ...grpc.CallOption) (*csipb.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements csi method
func (*ControllerClient) ControllerPublishVolume ¶
func (f *ControllerClient) ControllerPublishVolume(ctx context.Context, in *csipb.ControllerPublishVolumeRequest, opts ...grpc.CallOption) (*csipb.ControllerPublishVolumeResponse, error)
ControllerPublishVolume implements csi method
func (*ControllerClient) ControllerUnpublishVolume ¶
func (f *ControllerClient) ControllerUnpublishVolume(ctx context.Context, in *csipb.ControllerUnpublishVolumeRequest, opts ...grpc.CallOption) (*csipb.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume implements csi method
func (*ControllerClient) CreateVolume ¶
func (f *ControllerClient) CreateVolume(ctx context.Context, in *csipb.CreateVolumeRequest, opts ...grpc.CallOption) (*csipb.CreateVolumeResponse, error)
CreateVolume implements csi method
func (*ControllerClient) DeleteVolume ¶
func (f *ControllerClient) DeleteVolume(ctx context.Context, in *csipb.DeleteVolumeRequest, opts ...grpc.CallOption) (*csipb.DeleteVolumeResponse, error)
DeleteVolume implements csi method
func (*ControllerClient) GetCapacity ¶
func (f *ControllerClient) GetCapacity(ctx context.Context, in *csipb.GetCapacityRequest, opts ...grpc.CallOption) (*csipb.GetCapacityResponse, error)
GetCapacity implements csi method
func (*ControllerClient) ListVolumes ¶
func (f *ControllerClient) ListVolumes(ctx context.Context, in *csipb.ListVolumesRequest, opts ...grpc.CallOption) (*csipb.ListVolumesResponse, error)
ListVolumes implements csi method
func (*ControllerClient) SetNextCapabilities ¶
func (f *ControllerClient) SetNextCapabilities(caps []*csipb.ControllerServiceCapability)
SetNextCapabilities injects next expected capabilities
func (*ControllerClient) SetNextError ¶
func (f *ControllerClient) SetNextError(err error)
SetNextError injects next expected error
func (*ControllerClient) ValidateVolumeCapabilities ¶
func (f *ControllerClient) ValidateVolumeCapabilities(ctx context.Context, in *csipb.ValidateVolumeCapabilitiesRequest, opts ...grpc.CallOption) (*csipb.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities implements csi method
type IdentityClient ¶
type IdentityClient struct {
// contains filtered or unexported fields
}
IdentityClient is a CSI identity client used for testing
func NewIdentityClient ¶
func NewIdentityClient() *IdentityClient
NewIdentityClient returns a new IdentityClient
func (*IdentityClient) GetPluginCapabilities ¶ added in v1.10.0
func (f *IdentityClient) GetPluginCapabilities(ctx context.Context, in *csipb.GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*csipb.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities implements csi method
func (*IdentityClient) GetPluginInfo ¶
func (f *IdentityClient) GetPluginInfo(ctx context.Context, in *csipb.GetPluginInfoRequest, opts ...grpc.CallOption) (*csipb.GetPluginInfoResponse, error)
GetPluginInfo returns plugin info
func (*IdentityClient) Probe ¶ added in v1.10.0
func (f *IdentityClient) Probe(ctx context.Context, in *csipb.ProbeRequest, opts ...grpc.CallOption) (*csipb.ProbeResponse, error)
Probe implements csi method
func (*IdentityClient) SetNextError ¶
func (f *IdentityClient) SetNextError(err error)
SetNextError injects expected error
type NodeClient ¶
type NodeClient struct { FakeNodeExpansionRequest *csipb.NodeExpandVolumeRequest // contains filtered or unexported fields }
NodeClient returns CSI node client
func NewNodeClient ¶
func NewNodeClient(stageUnstageSet bool) *NodeClient
NewNodeClient returns fake node client
func NewNodeClientWithExpansion ¶ added in v1.14.0
func NewNodeClientWithExpansion(stageUnstageSet bool, expansionSet bool) *NodeClient
func NewNodeClientWithSingleNodeMultiWriter ¶ added in v1.22.0
func NewNodeClientWithSingleNodeMultiWriter(singleNodeMultiWriterSet bool) *NodeClient
func NewNodeClientWithVolumeMountGroup ¶ added in v1.22.0
func NewNodeClientWithVolumeMountGroup(stageUnstageSet, volumeMountGroupSet bool) *NodeClient
func NewNodeClientWithVolumeStats ¶ added in v1.15.0
func NewNodeClientWithVolumeStats(volumeStatsSet bool) *NodeClient
func NewNodeClientWithVolumeStatsAndCondition ¶ added in v1.21.0
func NewNodeClientWithVolumeStatsAndCondition(volumeStatsSet, volumeConditionSet bool) *NodeClient
func (*NodeClient) AddNodePublishedVolume ¶ added in v1.17.0
func (f *NodeClient) AddNodePublishedVolume(volID, deviceMountPath string, volumeContext map[string]string)
AddNodePublishedVolume adds specified volume to nodePublishedVolumes
func (*NodeClient) AddNodeStagedVolume ¶ added in v1.10.0
func (f *NodeClient) AddNodeStagedVolume(volID, deviceMountPath string, volumeContext map[string]string)
AddNodeStagedVolume adds specified volume to nodeStagedVolumes
func (*NodeClient) GetNodePublishedVolumes ¶
func (f *NodeClient) GetNodePublishedVolumes() map[string]CSIVolume
GetNodePublishedVolumes returns node published volumes
func (*NodeClient) GetNodeStagedVolumes ¶ added in v1.10.0
func (f *NodeClient) GetNodeStagedVolumes() map[string]CSIVolume
GetNodeStagedVolumes returns node staged volumes
func (*NodeClient) NodeExpandVolume ¶ added in v1.14.0
func (f *NodeClient) NodeExpandVolume(ctx context.Context, req *csipb.NodeExpandVolumeRequest, opts ...grpc.CallOption) (*csipb.NodeExpandVolumeResponse, error)
NodeExpandVolume implements csi method
func (*NodeClient) NodeGetCapabilities ¶
func (f *NodeClient) NodeGetCapabilities(ctx context.Context, in *csipb.NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*csipb.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities implements csi method
func (*NodeClient) NodeGetInfo ¶ added in v1.11.4
func (f *NodeClient) NodeGetInfo(ctx context.Context, in *csipb.NodeGetInfoRequest, opts ...grpc.CallOption) (*csipb.NodeGetInfoResponse, error)
NodeGetId implements csi method
func (*NodeClient) NodeGetVolumeStats ¶ added in v1.13.0
func (f *NodeClient) NodeGetVolumeStats(ctx context.Context, req *csipb.NodeGetVolumeStatsRequest, opts ...grpc.CallOption) (*csipb.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats implements csi method
func (*NodeClient) NodePublishVolume ¶
func (f *NodeClient) NodePublishVolume(ctx context.Context, req *csipb.NodePublishVolumeRequest, opts ...grpc.CallOption) (*csipb.NodePublishVolumeResponse, error)
NodePublishVolume implements CSI NodePublishVolume
func (*NodeClient) NodeStageVolume ¶ added in v1.10.0
func (f *NodeClient) NodeStageVolume(ctx context.Context, req *csipb.NodeStageVolumeRequest, opts ...grpc.CallOption) (*csipb.NodeStageVolumeResponse, error)
NodeStagevolume implements csi method
func (*NodeClient) NodeUnpublishVolume ¶
func (f *NodeClient) NodeUnpublishVolume(ctx context.Context, req *csipb.NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*csipb.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume implements csi method
func (*NodeClient) NodeUnstageVolume ¶ added in v1.10.0
func (f *NodeClient) NodeUnstageVolume(ctx context.Context, req *csipb.NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*csipb.NodeUnstageVolumeResponse, error)
NodeUnstageVolume implements csi method
func (*NodeClient) SetNextError ¶
func (f *NodeClient) SetNextError(err error)
SetNextError injects next expected error
func (*NodeClient) SetNodeGetInfoResp ¶ added in v1.11.4
func (f *NodeClient) SetNodeGetInfoResp(resp *csipb.NodeGetInfoResponse)
func (*NodeClient) SetNodeVolumeStatsResp ¶ added in v1.15.0
func (f *NodeClient) SetNodeVolumeStatsResp(resp *csipb.NodeGetVolumeStatsResponse)