Documentation
¶
Overview ¶
Package state manages the internal state of the driver which needs to be maintained across driver restarts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupSnapshot ¶ added in v1.13.0
type GroupSnapshot struct { Name string Id string SnapshotIDs []string SourceVolumeIDs []string CreationTime *timestamp.Timestamp ReadyToUse bool }
func (*GroupSnapshot) MatchesSnapshotIDs ¶ added in v1.13.0
func (gs *GroupSnapshot) MatchesSnapshotIDs(snapshotIDs []string) bool
func (*GroupSnapshot) MatchesSourceVolumeIDs ¶ added in v1.13.0
func (gs *GroupSnapshot) MatchesSourceVolumeIDs(sourceVolumeIDs []string) bool
type State ¶
type State interface { // GetVolumeByID retrieves a volume by its unique ID or returns // an error including that ID when not found. GetVolumeByID(volID string) (Volume, error) // GetVolumeByName retrieves a volume by its name or returns // an error including that name when not found. GetVolumeByName(volName string) (Volume, error) // GetVolumes returns all currently existing volumes. GetVolumes() []Volume // UpdateVolume updates the existing hostpath volume, // identified by its volume ID, or adds it if it does // not exist yet. UpdateVolume(volume Volume) error // DeleteVolume deletes the volume with the given // volume ID. It is not an error when such a volume // does not exist. DeleteVolume(volID string) error // GetSnapshotByID retrieves a snapshot by its unique ID or returns // an error including that ID when not found. GetSnapshotByID(snapshotID string) (Snapshot, error) // GetSnapshotByName retrieves a snapshot by its name or returns // an error including that name when not found. GetSnapshotByName(volName string) (Snapshot, error) // GetSnapshots returns all currently existing snapshots. GetSnapshots() []Snapshot // UpdateSnapshot updates the existing hostpath snapshot, // identified by its snapshot ID, or adds it if it does // not exist yet. UpdateSnapshot(snapshot Snapshot) error // DeleteSnapshot deletes the snapshot with the given // snapshot ID. It is not an error when such a snapshot // does not exist. DeleteSnapshot(snapshotID string) error // GetGroupSnapshotByID retrieves a groupsnapshot by its unique ID or // returns an error including that ID when not found. GetGroupSnapshotByID(vgsID string) (GroupSnapshot, error) // GetGroupSnapshotByName retrieves a groupsnapshot by its name or // returns an error including that name when not found. GetGroupSnapshotByName(volName string) (GroupSnapshot, error) // GetGroupSnapshots returns all currently existing groupsnapshots. GetGroupSnapshots() []GroupSnapshot // UpdateGroupSnapshot updates the existing hostpath groupsnapshot, // identified by its snapshot ID, or adds it if it does not exist yet. UpdateGroupSnapshot(snapshot GroupSnapshot) error // DeleteGroupSnapshot deletes the groupsnapshot with the given // groupsnapshot ID. It is not an error when such a groupsnapshot does // not exist. DeleteGroupSnapshot(groupSnapshotID string) error }
State is the interface that the rest of the code has to use to access and change state. All error messages contain gRPC status codes and can be returned without wrapping.
type Strings ¶
type Strings []string
Strings is an ordered set of strings with helper functions for adding, searching and removing entries.
type Volume ¶
type Volume struct { VolName string VolID string VolSize int64 VolPath string VolAccessType AccessType ParentVolID string ParentSnapID string Ephemeral bool NodeID string Kind string ReadOnlyAttach bool Attached bool // Staged contains the staging target path at which the volume // was staged. A set of paths is used for consistency // with Published. Staged Strings // Published contains the target paths where the volume // was published. Published Strings }
Click to show internal directories.
Click to hide internal directories.