package service
import "k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service"
Index ¶
- Constants
- Variables
- type Config
- type DirIO
- type OSDirIO
- func (o OSDirIO) DirExists(path string) (bool, error)
- func (o OSDirIO) Mkdir(path string) error
- func (o OSDirIO) RemoveAll(path string) error
- type Service
- type Volume
Constants ¶
const ( MaxStorageCapacity = tib ReadOnlyKey = "readonly" )
const ( // Name is the name of the CSI plug-in. Name = "io.kubernetes.storage.mock" // VendorVersion is the version returned by GetPluginInfo. VendorVersion = "0.3.0" // TopologyKey simulates a per-node topology. TopologyKey = Name + "/node" // TopologyValue is the one, fixed node on which the driver runs. TopologyValue = "some-mock-node" )
Variables ¶
var Manifest = map[string]string{ "url": "https://k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock", }
Manifest is the SP's manifest.
Types ¶
type Config ¶
type Config struct {
DisableAttach bool
DriverName string
AttachLimit int64
NodeExpansionRequired bool
VolumeMountGroupRequired bool
DisableControllerExpansion bool
DisableOnlineExpansion bool
PermissiveTargetPath bool
EnableTopology bool
IO DirIO
}
type DirIO ¶
type DirIO interface {
// DirExists returns false if the path doesn't exist, true if it exists and is a directory, an error otherwise.
DirExists(path string) (bool, error)
// Mkdir creates the directory, but not its parents, with 0755 permissions.
Mkdir(path string) error
// RemoveAll removes the path and everything contained inside it. It's not an error if the path does not exist.
RemoveAll(path string) error
}
DirIO is an abstraction over direct os calls.
type OSDirIO ¶
type OSDirIO struct{}
func (OSDirIO) DirExists ¶
func (OSDirIO) Mkdir ¶
func (OSDirIO) RemoveAll ¶
type Service ¶
type Service interface {
csi.ControllerServer
csi.IdentityServer
csi.NodeServer
}
Service is the CSI Mock service provider.
func New ¶
New returns a new Service.
type Volume ¶
type Volume struct {
VolumeCSI csi.Volume
NodeID string
ISStaged bool
ISPublished bool
ISEphemeral bool
ISControllerPublished bool
StageTargetPath string
TargetPath string
}
Source Files ¶
controller.go identity.go node.go service.go
- Version
- v1.24.6
- Published
- Sep 21, 2022
- Platform
- darwin/amd64
- Imports
- 16 packages
- Last checked
- 7 minutes ago –
Tools for package owners.