MCPcopy Index your code
hub / github.com/moby/swarmkit / Volume

Struct Volume

api/objects.pb.go:764–784  ·  view source on GitHub ↗

Volume is the top-level object describing a volume usable by Swarmkit. The Volume contains the user's VolumeSpec, the Volume's status, and the Volume object that was returned by the CSI Plugin when the volume was created.

Source from the content-addressed store, hash-verified

762// Volume contains the user's VolumeSpec, the Volume's status, and the Volume
763// object that was returned by the CSI Plugin when the volume was created.
764type Volume struct {
765 // ID is the swarmkit-internal ID for this volume object. This has no
766 // relation to the CSI volume identifier provided by the CSI Plugin.
767 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
768 Meta Meta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
769 // Spec is the desired state of the Volume, as provided by the user.
770 Spec VolumeSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec"`
771 // PublishStatus is the status of the volume as it pertains to the various
772 // nodes it is in use on.
773 PublishStatus []*VolumePublishStatus `protobuf:"bytes,4,rep,name=publish_status,json=publishStatus,proto3" json:"publish_status,omitempty"`
774 // VolumeInfo contains information about the volume originating from the
775 // CSI plugin when the volume is created.
776 VolumeInfo *VolumeInfo `protobuf:"bytes,5,opt,name=volume_info,json=volumeInfo,proto3" json:"volume_info,omitempty"`
777 // PendingDelete indicates that this Volume is being removed from Swarm.
778 // Before a Volume can be removed, we must call the DeleteVolume on the
779 // Controller. Because of this, we cannot immediately remove the Volume
780 // when a user wishes to delete it. Instead, we will mark a Volume with
781 // PendingDelete = true, which instructs Swarm to go through the work of
782 // removing the volume and then delete it when finished.
783 PendingDelete bool `protobuf:"varint,6,opt,name=pending_delete,json=pendingDelete,proto3" json:"pending_delete,omitempty"`
784}
785
786func (m *Volume) Reset() { *m = Volume{} }
787func (*Volume) ProtoMessage() {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected