Documentation
¶
Index ¶
- Constants
- Variables
- func ChainStreamClient(interceptors ...grpc.StreamClientInterceptor) grpc.StreamClientInterceptor
- func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
- func ChainUnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.UnaryClientInterceptor
- func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func LoggingInterceptor() grpc.UnaryServerInterceptor
- func SetLogger(l logger)
- func WithStreamServerChain(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption
- func WithUnaryServerChain(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
- type Client
- type Server
- func (s *Server) ControllerGetCapabilities(ctx context.Context, request *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (s *Server) ControllerPublishVolume(ctx context.Context, request *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (s *Server) ControllerUnpublishVolume(ctx context.Context, request *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (s *Server) CreateVolume(ctx context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (s *Server) DeleteVolume(ctx context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (s *Server) GetCapacity(ctx context.Context, request *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (s *Server) GetPluginCapabilities(ctx context.Context, request *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (s *Server) GetPluginInfo(ctx context.Context, request *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (s *Server) ListVolumes(ctx context.Context, request *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (s *Server) NodeGetCapabilities(ctx context.Context, request *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (s *Server) NodeGetId(ctx context.Context, request *csi.NodeGetIdRequest) (*csi.NodeGetIdResponse, error)
- func (s *Server) NodePublishVolume(ctx context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (s *Server) NodeStageVolume(ctx context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (s *Server) NodeUnpublishVolume(ctx context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (s *Server) NodeUnstageVolume(ctx context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (s *Server) Probe(ctx context.Context, request *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (s *Server) Setup() error
- func (s *Server) ValidateVolumeCapabilities(ctx context.Context, request *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type ServerOpt
Constants ¶
const PluginName = "io.mesosphere.dcos.storage.csilvm"
const PluginVersion = "0.2.0"
Variables ¶
var ErrBlockVolNoRO = status.Error( codes.InvalidArgument, "Cannot publish block volume as readonly.")
var ErrCallNotImplemented = status.Error(codes.Unimplemented, "That RPC is not implemented.")
var ErrCapacityRangeInvalidSize = status.Error( codes.InvalidArgument, "The required_bytes cannot exceed the limit_bytes.")
var ErrCapacityRangeUnspecified = status.Error( codes.InvalidArgument, "One of required_bytes or limit_bytes must"+ "be specified if capacity_range is specified.")
var ErrInsufficientCapacity = status.Error(codes.OutOfRange, "Not enough free space")
var ErrInvalidAccessMode = status.Error( codes.InvalidArgument, "The volume_capability.access_mode.mode is invalid.")
var ErrMismatchedFilesystemType = status.Error( codes.InvalidArgument, "The requested fs_type does not match the existing filesystem on the volume.")
var ErrMissingAccessMode = status.Error( codes.InvalidArgument, "The volume_capability.access_mode field must be specified.")
var ErrMissingAccessModeMode = status.Error( codes.InvalidArgument, "The volume_capability.access_mode.mode field must be specified.")
var ErrMissingAccessType = status.Error( codes.InvalidArgument, "The volume_capability.access_type field must be specified.")
var ErrMissingName = status.Error(codes.InvalidArgument, "The name field must be specified.")
var ErrMissingTargetPath = status.Error(codes.InvalidArgument, "The target_path field must be specified.")
var ErrMissingVolumeCapabilities = status.Error(codes.InvalidArgument, "The volume_capabilities field must be specified.")
var ErrMissingVolumeCapability = status.Error(codes.InvalidArgument, "The volume_capability field must be specified.")
var ErrMissingVolumeId = status.Error(codes.InvalidArgument, "The volume_id field must be specified.")
var ErrRemovingMode = status.Error( codes.FailedPrecondition, "This service is running in 'remove volume group' mode.")
var ErrSpecifiedPublishInfo = status.Error(codes.InvalidArgument, "The publish_volume_info field must not be specified.")
var ErrTargetPathNotEmpty = status.Error( codes.InvalidArgument, "Unexpected device already mounted at targetPath.")
var ErrTargetPathRO = status.Error( codes.InvalidArgument, "The targetPath is already mounted readonly.")
var ErrTargetPathRW = status.Error( codes.InvalidArgument, "The targetPath is already mounted read-write.")
var ErrUnsupportedAccessMode = status.Error( codes.InvalidArgument, "The volume_capability.access_mode.mode is unsupported.")
var ErrUnsupportedFilesystem = status.Error(codes.FailedPrecondition, "The requested filesystem type is unknown.")
var ErrVolumeAlreadyExists = status.Error(codes.AlreadyExists, "The volume already exists")
var ErrVolumeNotFound = status.Error(codes.NotFound, "The volume does not exist.")
Functions ¶
func ChainStreamClient ¶
func ChainStreamClient(interceptors ...grpc.StreamClientInterceptor) grpc.StreamClientInterceptor
ChainStreamClient creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainStreamClient(one, two, three) will execute one before two before three.
func ChainStreamServer ¶
func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
ChainStreamServer creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three. If you want to pass context between interceptors, use WrapServerStream.
func ChainUnaryClient ¶
func ChainUnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.UnaryClientInterceptor
ChainUnaryClient creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryClient(one, two, three) will execute one before two before three.
func ChainUnaryServer ¶
func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
ChainUnaryServer creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three, and three will see context changes of one and two.
func LoggingInterceptor ¶
func LoggingInterceptor() grpc.UnaryServerInterceptor
func WithStreamServerChain ¶
func WithStreamServerChain(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption
WithStreamServerChain is a grpc.Server config option that accepts multiple stream interceptors. Basically syntactic sugar.
func WithUnaryServerChain ¶
func WithUnaryServerChain(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
Chain creates a single interceptor out of a chain of many interceptors.
WithUnaryServerChain is a grpc.Server config option that accepts multiple unary interceptors. Basically syntactic sugar.
Types ¶
type Client ¶
type Client struct {
csi.IdentityClient
csi.ControllerClient
csi.NodeClient
}
func NewClient ¶
func NewClient(conn *grpc.ClientConn) *Client
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
NewServer returns a new Server that will manage the given LVM volume group. It accepts a variadic list of ServerOpt with which the server's default options can be overwritten. The Setup method must be called before any other further method calls are performed in order to setup/remove the volume group.
func (*Server) ControllerGetCapabilities ¶
func (s *Server) ControllerGetCapabilities( ctx context.Context, request *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
func (*Server) ControllerPublishVolume ¶
func (s *Server) ControllerPublishVolume( ctx context.Context, request *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*Server) ControllerUnpublishVolume ¶
func (s *Server) ControllerUnpublishVolume( ctx context.Context, request *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*Server) CreateVolume ¶
func (s *Server) CreateVolume( ctx context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*Server) DeleteVolume ¶
func (s *Server) DeleteVolume( ctx context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*Server) GetCapacity ¶
func (s *Server) GetCapacity( ctx context.Context, request *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*Server) GetPluginCapabilities ¶
func (s *Server) GetPluginCapabilities( ctx context.Context, request *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*Server) GetPluginInfo ¶
func (s *Server) GetPluginInfo( ctx context.Context, request *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
func (*Server) ListVolumes ¶
func (s *Server) ListVolumes( ctx context.Context, request *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*Server) NodeGetCapabilities ¶
func (s *Server) NodeGetCapabilities( ctx context.Context, request *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*Server) NodeGetId ¶
func (s *Server) NodeGetId( ctx context.Context, request *csi.NodeGetIdRequest) (*csi.NodeGetIdResponse, error)
func (*Server) NodePublishVolume ¶
func (s *Server) NodePublishVolume( ctx context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*Server) NodeStageVolume ¶
func (s *Server) NodeStageVolume( ctx context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*Server) NodeUnpublishVolume ¶
func (s *Server) NodeUnpublishVolume( ctx context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*Server) NodeUnstageVolume ¶
func (s *Server) NodeUnstageVolume( ctx context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
func (*Server) Probe ¶
func (s *Server) Probe( ctx context.Context, request *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe is currently a no-op.
func (*Server) Setup ¶
Setup checks that the specified volume group exists, creating it if it does not. If the RemoveVolumeGroup option is set this method removes the volume group.
func (*Server) ValidateVolumeCapabilities ¶
func (s *Server) ValidateVolumeCapabilities( ctx context.Context, request *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type ServerOpt ¶
type ServerOpt func(*Server)
func DefaultVolumeSize ¶
DefaultVolumeSize sets the default size in bytes of new volumes if no volume capacity is specified. To specify that a new volume should consist of all available space on the volume group you can pass `lvm.MaxSize` to this option.
func RemoveVolumeGroup ¶
func RemoveVolumeGroup() ServerOpt
RemoveVolumeGroup configures the Server to operate in "remove" mode. The volume group will be removed when the server starts. Most RPCs will return an error if the plugin is started in this mode.