Documentation
¶
Index ¶
- type Client
- type MockClient
- func (c *MockClient) CloseConnection()
- func (c *MockClient) Expand(ctx context.Context, volumeID string, requestBytes int64, ...) (int64, bool, error)
- func (c *MockClient) GetCapability() *csi.VolumeCapability
- func (c *MockClient) GetDriverName(context.Context) (string, error)
- func (c *MockClient) GetExpandCount() int
- func (c *MockClient) GetModifyCount() int
- func (c *MockClient) GetSecrets() map[string]string
- func (c *MockClient) Modify(ctx context.Context, volumeID string, secrets map[string]string, ...) error
- func (c *MockClient) SetCheckMigratedLabel()
- func (c *MockClient) SetExpansionError(err error)
- func (c *MockClient) SetModifyError(err error)
- func (c *MockClient) SupportsControllerModify(context.Context) (bool, error)
- func (c *MockClient) SupportsControllerResize(context.Context) (bool, error)
- func (c *MockClient) SupportsControllerSingleNodeMultiWriter(context.Context) (bool, error)
- func (c *MockClient) SupportsNodeResize(context.Context) (bool, error)
- func (c *MockClient) SupportsPluginControllerService(context.Context) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// GetDriverName returns driver name as discovered by GetPluginInfo()
// gRPC call.
GetDriverName(ctx context.Context) (string, error)
// SupportsPluginControllerService return true if the CSI driver reports
// CONTROLLER_SERVICE in GetPluginCapabilities() gRPC call.
SupportsPluginControllerService(ctx context.Context) (bool, error)
// SupportsControllerResize returns whether the CSI driver reports EXPAND_VOLUME
// in ControllerGetCapabilities() gRPC call.
SupportsControllerResize(ctx context.Context) (bool, error)
// SupportsNodeResize returns whether the CSI driver reports EXPAND_VOLUME
// in NodeGetCapabilities() gRPC call.
SupportsNodeResize(ctx context.Context) (bool, error)
// SupportsControllerModify returns whether the CSI driver reports MODIFY_VOLUME
// in ControllerGetCapabilities() gRPC call.
SupportsControllerModify(ctx context.Context) (bool, error)
// SupportsControllerSingleNodeMultiWriter returns whether the CSI driver reports
// SINGLE_NODE_MULTI_WRITER in ControllerGetCapabilities() gRPC call.
SupportsControllerSingleNodeMultiWriter(ctx context.Context) (bool, error)
// Expand expands the volume to a new size at least as big as requestBytes.
// It returns the new size and whether the volume need expand operation on the node.
Expand(ctx context.Context, volumeID string, requestBytes int64, secrets map[string]string, capability *csi.VolumeCapability) (int64, bool, error)
//CloseConnection closes the gRPC connection established by the client
CloseConnection()
// Modify modifies the volume's mutable parameters
Modify(ctx context.Context, volumeID string, secrets map[string]string, mutableParameters map[string]string) error
}
Client is a gRPC client connect to remote CSI driver and abstracts all CSI calls.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
func NewMockClient ¶
func (*MockClient) CloseConnection ¶ added in v1.2.0
func (c *MockClient) CloseConnection()
func (*MockClient) GetCapability ¶ added in v0.5.0
func (c *MockClient) GetCapability() *csi.VolumeCapability
func (*MockClient) GetDriverName ¶
func (c *MockClient) GetDriverName(context.Context) (string, error)
func (*MockClient) GetExpandCount ¶ added in v0.3.0
func (c *MockClient) GetExpandCount() int
func (*MockClient) GetModifyCount ¶ added in v1.10.0
func (c *MockClient) GetModifyCount() int
func (*MockClient) GetSecrets ¶ added in v0.2.0
func (c *MockClient) GetSecrets() map[string]string
GetSecrets returns secrets used for volume expansion
func (*MockClient) SetCheckMigratedLabel ¶ added in v1.2.0
func (c *MockClient) SetCheckMigratedLabel()
func (*MockClient) SetExpansionError ¶ added in v1.11.0
func (c *MockClient) SetExpansionError(err error)
func (*MockClient) SetModifyError ¶ added in v1.13.0
func (c *MockClient) SetModifyError(err error)
func (*MockClient) SupportsControllerModify ¶ added in v1.10.0
func (c *MockClient) SupportsControllerModify(context.Context) (bool, error)
func (*MockClient) SupportsControllerResize ¶
func (c *MockClient) SupportsControllerResize(context.Context) (bool, error)
func (*MockClient) SupportsControllerSingleNodeMultiWriter ¶ added in v1.3.0
func (c *MockClient) SupportsControllerSingleNodeMultiWriter(context.Context) (bool, error)
func (*MockClient) SupportsNodeResize ¶
func (c *MockClient) SupportsNodeResize(context.Context) (bool, error)
func (*MockClient) SupportsPluginControllerService ¶
func (c *MockClient) SupportsPluginControllerService(context.Context) (bool, error)
Click to show internal directories.
Click to hide internal directories.