Documentation ¶
Index ¶
- type MockCSIProviderServer
- func (m *MockCSIProviderServer) Mount(ctx context.Context, req *v1alpha1.MountRequest) (*v1alpha1.MountResponse, error)
- func (m *MockCSIProviderServer) SetFiles(files []*v1alpha1.File)
- func (m *MockCSIProviderServer) SetObjects(objects map[string]string)
- func (m *MockCSIProviderServer) SetProviderErrorCode(errorCode string)
- func (m *MockCSIProviderServer) SetReturnError(err error)
- func (m *MockCSIProviderServer) Start() error
- func (m *MockCSIProviderServer) Stop()
- func (m *MockCSIProviderServer) Version(ctx context.Context, req *v1alpha1.VersionRequest) (*v1alpha1.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCSIProviderServer ¶
type MockCSIProviderServer struct {
// contains filtered or unexported fields
}
func NewMocKCSIProviderServer ¶
func NewMocKCSIProviderServer(socketPath string) (*MockCSIProviderServer, error)
NewMocKCSIProviderServer returns a mock csi-provider grpc server
func (*MockCSIProviderServer) Mount ¶
func (m *MockCSIProviderServer) Mount(ctx context.Context, req *v1alpha1.MountRequest) (*v1alpha1.MountResponse, error)
Mount implements provider csi-provider method
func (*MockCSIProviderServer) SetFiles ¶ added in v0.0.21
func (m *MockCSIProviderServer) SetFiles(files []*v1alpha1.File)
SetFiles sets provider files to return on Mount
func (*MockCSIProviderServer) SetObjects ¶
func (m *MockCSIProviderServer) SetObjects(objects map[string]string)
SetObjects sets expected objects id and version
func (*MockCSIProviderServer) SetProviderErrorCode ¶
func (m *MockCSIProviderServer) SetProviderErrorCode(errorCode string)
SetProviderErrorCode sets provider error code to return
func (*MockCSIProviderServer) SetReturnError ¶
func (m *MockCSIProviderServer) SetReturnError(err error)
SetReturnError sets expected error
func (*MockCSIProviderServer) Start ¶
func (m *MockCSIProviderServer) Start() error
func (*MockCSIProviderServer) Stop ¶ added in v0.0.21
func (m *MockCSIProviderServer) Stop()
func (*MockCSIProviderServer) Version ¶
func (m *MockCSIProviderServer) Version(ctx context.Context, req *v1alpha1.VersionRequest) (*v1alpha1.VersionResponse, error)
Version implements provider csi-provider method
Click to show internal directories.
Click to hide internal directories.