Documentation ¶
Index ¶
- type Handler
- func (ldHandler *Handler) BoundTo(ldc *v1alpha1.LocalDiskClaim) error
- func (ldHandler *Handler) ClaimRef() *v1.ObjectReference
- func (ldHandler *Handler) FilterDisk(ldc *v1alpha1.LocalDiskClaim) bool
- func (ldHandler *Handler) For(ld *v1alpha1.LocalDisk) *Handler
- func (ldHandler *Handler) GetFilterFailMessages() map[string]bool
- func (ldHandler *Handler) GetLocalDisk(key client.ObjectKey) (*v1alpha1.LocalDisk, error)
- func (ldHandler *Handler) GetLocalDiskWithLabels(labels labels.Set) (*v1alpha1.LocalDiskList, error)
- func (ldHandler *Handler) IsEmpty() bool
- func (ldHandler *Handler) ListLocalDisk() (*v1alpha1.LocalDiskList, error)
- func (ldHandler *Handler) ListLocalDiskByNodeDevicePath(nodeName, devPath string) ([]v1alpha1.LocalDisk, error)
- func (ldHandler *Handler) ListLocalDiskDirectly() (*v1alpha1.LocalDiskList, error)
- func (ldHandler *Handler) ListNodeLocalDisk(node string) (*v1alpha1.LocalDiskList, error)
- func (ldHandler *Handler) PatchDiskOwner(owner string) error
- func (ldHandler *Handler) PatchDiskSpec(patch client.Patch) error
- func (ldHandler *Handler) RecordEvent(eventtype, reason, messageFmt string, args ...interface{})
- func (ldHandler *Handler) RemoveLabel(labels labels.Set)
- func (ldHandler *Handler) ReserveDisk()
- func (ldHandler *Handler) SetOwner(owner string)
- func (ldHandler *Handler) SetPartition(hasPartition bool)
- func (ldHandler *Handler) SetupLabel(labels labels.Set)
- func (ldHandler *Handler) SetupStatus(status v1alpha1.LocalDiskState)
- func (ldHandler *Handler) UnClaimed() bool
- func (ldHandler *Handler) Update() error
- func (ldHandler *Handler) UpdateStatus() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { client.Client record.EventRecorder // contains filtered or unexported fields }
func NewLocalDiskHandler ¶
func NewLocalDiskHandler(cli client.Client, recorder record.EventRecorder) *Handler
func (*Handler) BoundTo ¶
func (ldHandler *Handler) BoundTo(ldc *v1alpha1.LocalDiskClaim) error
BoundTo assign disk to ldc
func (*Handler) ClaimRef ¶
func (ldHandler *Handler) ClaimRef() *v1.ObjectReference
func (*Handler) FilterDisk ¶
func (ldHandler *Handler) FilterDisk(ldc *v1alpha1.LocalDiskClaim) bool
func (*Handler) GetFilterFailMessages ¶
func (*Handler) GetLocalDisk ¶
func (*Handler) GetLocalDiskWithLabels ¶
func (*Handler) ListLocalDisk ¶
func (ldHandler *Handler) ListLocalDisk() (*v1alpha1.LocalDiskList, error)
func (*Handler) ListLocalDiskByNodeDevicePath ¶
func (ldHandler *Handler) ListLocalDiskByNodeDevicePath(nodeName, devPath string) ([]v1alpha1.LocalDisk, error)
ListLocalDiskByNodeDevicePath returns LocalDisks by given node device path This is should only be used when disk serial cannot be found(e.g. trigger by disk remove events)
func (*Handler) ListLocalDiskDirectly ¶
func (ldHandler *Handler) ListLocalDiskDirectly() (*v1alpha1.LocalDiskList, error)
ListLocalDiskDirectly query localdisk list from API Server directly NOTE: The performance is relatively slow and may cause relatively high latency
func (*Handler) ListNodeLocalDisk ¶
func (ldHandler *Handler) ListNodeLocalDisk(node string) (*v1alpha1.LocalDiskList, error)
func (*Handler) PatchDiskOwner ¶
func (*Handler) RecordEvent ¶
func (*Handler) RemoveLabel ¶
func (*Handler) ReserveDisk ¶
func (ldHandler *Handler) ReserveDisk()
func (*Handler) SetPartition ¶
func (*Handler) SetupLabel ¶
func (*Handler) SetupStatus ¶
func (ldHandler *Handler) SetupStatus(status v1alpha1.LocalDiskState)
func (*Handler) UpdateStatus ¶
Click to show internal directories.
Click to hide internal directories.