oimcsidriver

package
v0.0.0-...-ee17956 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Start(ctx context.Context) (*oimcommon.NonBlockingGRPCServer, error)
	Run(ctx context.Context) error
}

Driver is the public interface for managing the OIM CSI driver.

func New

func New(options ...Option) (Driver, error)

New constructs a new OIM driver instance.

type EmulateCSI0Driver

type EmulateCSI0Driver struct {
	CSIDriverName                 string
	ControllerServiceCapabilities []csi0.ControllerServiceCapability_RPC_Type
	VolumeCapabilityAccessModes   []csi0.VolumeCapability_AccessMode_Mode
	MapVolumeParams               func(from *csi0.NodeStageVolumeRequest, to *oim.MapVolumeRequest) error
}

EmulateCSI0Driver deals with parameters meant for some other CSI v0.3 driver.

type EmulateCSIDriver

type EmulateCSIDriver struct {
	CSIDriverName                 string
	ControllerServiceCapabilities []csi.ControllerServiceCapability_RPC_Type
	VolumeCapabilityAccessModes   []csi.VolumeCapability_AccessMode_Mode
	MapVolumeParams               func(from *csi.NodeStageVolumeRequest, to *oim.MapVolumeRequest) error
}

EmulateCSIDriver deals with parameters meant for some other CSI v1.0 driver.

type OIMBackend

type OIMBackend interface {
	// contains filtered or unexported methods
}

OIMBackend defines the actual implementation of several operations. It has two implementations: - OIM CSI driver directly controlling SPDK running on the same host (local.go) - OIM CSI driver controlling SPDK through OIM registry and controller (remote.go)

type Option

type Option func(*oimDriver) error

Option is the type-safe parameter for configuring New.

func WithCSIEndpoint

func WithCSIEndpoint(endpoint string) Option

WithCSIEndpoint determines what the driver listens on. Uses the same unix:// or tcp:// prefix as other CSI drivers to determine the network.

func WithCSIVersion

func WithCSIVersion(version string) Option

WithCSIVersion sets the CSI version that is to be implemented by the driver.

func WithDriverName

func WithDriverName(name string) Option

WithDriverName overrides the default CSI driver name.

func WithDriverVersion

func WithDriverVersion(version string) Option

WithDriverVersion sets the version reported by the driver.

func WithEmulation

func WithEmulation(csiDriverName string) Option

WithEmulation switches between different personalities: in this mode, the OIM CSI driver handles arguments for some other, "emulated" CSI driver and redirects local node operations to the OIM controller.

func WithNodeID

func WithNodeID(id string) Option

WithNodeID sets the node ID reported by the driver.

func WithOIMControllerID

func WithOIMControllerID(id string) Option

WithOIMControllerID sets the ID assigned to the controller that is responsible for the host.

func WithOIMRegistryAddress

func WithOIMRegistryAddress(address string) Option

WithOIMRegistryAddress sets the gRPC dial string for contacting the OIM registry.

func WithRegistryCreds

func WithRegistryCreds(ca, key string) Option

WithRegistryCreds sets the TLS key and CA for connections to the OIM registry.

func WithVHostEndpoint

func WithVHostEndpoint(endpoint string) Option

WithVHostEndpoint sets the net.Dial string for the SPDK RPC communication.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL