Documentation ¶
Index ¶
- Variables
- type AttachOpts
- type CreateOpts
- type DeleteOpts
- type DetachOpts
- type FindOpts
- type Option
- type Options
- type ResizeOpts
- type Service
- func (s *Service) Attach(ctx context.Context, opts AttachOpts) error
- func (s *Service) Create(ctx context.Context, opts CreateOpts) error
- func (s *Service) Delete(ctx context.Context, opts DeleteOpts) error
- func (s *Service) Detach(ctx context.Context, opts DetachOpts) error
- func (s *Service) Find(ctx context.Context, opts FindOpts) (*model.Volume, error)
- func (s *Service) Resize(ctx context.Context, opts ResizeOpts) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrVolumeNotFound TODO ErrVolumeNotFound = errors.New("volume not found") // ErrVolumeAlreadyExists TODO ErrVolumeAlreadyExists = errors.New("volume does already exist") // ErrServerNotFound TODO ErrServerNotFound = errors.New("server not found") // ErrStillAttached TODO ErrStillAttached = errors.New("volume is attached") // ErrNotAttached TODO ErrNotAttached = errors.New("volume is not attached") // ErrAttachLimitReached TODO ErrAttachLimitReached = errors.New("max number of attachments per server reached") // ErrLockedServer TODO ErrLockedServer = errors.New("server is locked") )
Functions ¶
This section is empty.
Types ¶
type AttachOpts ¶
AttachOpts defines the available options for the attach handler.
type CreateOpts ¶
CreateOpts defines the available options for the create handler.
type DeleteOpts ¶
type DeleteOpts struct {
ID string
}
DeleteOpts defines the available options for the delete handler.
type DetachOpts ¶
DetachOpts defines the available options for the detach handler.
type FindOpts ¶
type FindOpts struct {
ID string
}
FindOpts defines the available options for the find handler.
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func WithClient ¶
WithClient provides a function to set the client option.
type ResizeOpts ¶
ResizeOpts defines the available options for the resize handler.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines the service for the resize component.
func NewService ¶
NewService simply initializes a new resize service.
func (*Service) Attach ¶
func (s *Service) Attach(ctx context.Context, opts AttachOpts) error
Attach is handling the attaching of a volume to a server.
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, opts CreateOpts) error
Create is handling the creation of a volume for a server.
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, opts DeleteOpts) error
Delete is handling the deletion of a volume from a server.
func (*Service) Detach ¶
func (s *Service) Detach(ctx context.Context, opts DetachOpts) error
Detach is handling the detaching of a volume from a server.