csilvm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "io.mesosphere.dcos.storage.csilvm"
View Source
const PluginVersion = "0.2.0"

Variables

View Source
var ErrBlockVolNoRO = status.Error(
	codes.InvalidArgument,
	"Cannot publish block volume as readonly.")
View Source
var ErrCallNotImplemented = status.Error(codes.Unimplemented, "That RPC is not implemented.")
View Source
var ErrCapacityRangeInvalidSize = status.Error(
	codes.InvalidArgument,
	"The required_bytes cannot exceed the limit_bytes.")
View Source
var ErrCapacityRangeUnspecified = status.Error(
	codes.InvalidArgument,
	"One of required_bytes or limit_bytes must"+
		"be specified if capacity_range is specified.")
View Source
var ErrInsufficientCapacity = status.Error(codes.OutOfRange, "Not enough free space")
View Source
var ErrInvalidAccessMode = status.Error(
	codes.InvalidArgument,
	"The volume_capability.access_mode.mode is invalid.")
View Source
var ErrMismatchedFilesystemType = status.Error(
	codes.InvalidArgument,
	"The requested fs_type does not match the existing filesystem on the volume.")
View Source
var ErrMissingAccessMode = status.Error(
	codes.InvalidArgument,
	"The volume_capability.access_mode field must be specified.")
View Source
var ErrMissingAccessModeMode = status.Error(
	codes.InvalidArgument,
	"The volume_capability.access_mode.mode field must be specified.")
View Source
var ErrMissingAccessType = status.Error(
	codes.InvalidArgument,
	"The volume_capability.access_type field must be specified.")
View Source
var ErrMissingName = status.Error(codes.InvalidArgument, "The name field must be specified.")
View Source
var ErrMissingTargetPath = status.Error(codes.InvalidArgument, "The target_path field must be specified.")
View Source
var ErrMissingVolumeCapabilities = status.Error(codes.InvalidArgument, "The volume_capabilities field must be specified.")
View Source
var ErrMissingVolumeCapability = status.Error(codes.InvalidArgument, "The volume_capability field must be specified.")
View Source
var ErrMissingVolumeId = status.Error(codes.InvalidArgument, "The volume_id field must be specified.")
View Source
var ErrRemovingMode = status.Error(
	codes.FailedPrecondition,
	"This service is running in 'remove volume group' mode.")
View Source
var ErrSpecifiedPublishInfo = status.Error(codes.InvalidArgument, "The publish_volume_info field must not be specified.")
View Source
var ErrTargetPathNotEmpty = status.Error(
	codes.InvalidArgument,
	"Unexpected device already mounted at targetPath.")
View Source
var ErrTargetPathRO = status.Error(
	codes.InvalidArgument,
	"The targetPath is already mounted readonly.")
View Source
var ErrTargetPathRW = status.Error(
	codes.InvalidArgument,
	"The targetPath is already mounted read-write.")
View Source
var ErrUnsupportedAccessMode = status.Error(
	codes.InvalidArgument,
	"The volume_capability.access_mode.mode is unsupported.")
View Source
var ErrUnsupportedFilesystem = status.Error(codes.FailedPrecondition, "The requested filesystem type is unknown.")
View Source
var ErrVolumeAlreadyExists = status.Error(codes.AlreadyExists, "The volume already exists")
View Source
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 SetLogger

func SetLogger(l logger)

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

func NewClient

func NewClient(conn *grpc.ClientConn) *Client

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(vgname string, pvnames []string, defaultFs string, opts ...ServerOpt) *Server

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

func (s *Server) Setup() error

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.

type ServerOpt

type ServerOpt func(*Server)

func DefaultVolumeSize

func DefaultVolumeSize(size uint64) ServerOpt

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.

func SupportedFilesystem

func SupportedFilesystem(fstype string) ServerOpt

func Tag

func Tag(tag string) ServerOpt

Tag configures the volume group with the specified tag. Any volumes that are created will be tagged with the volume group tags.

Jump to

Keyboard shortcuts

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