Documentation ¶
Index ¶
- Constants
- Variables
- func ExportPath(rsc *ResourceConfig, vol *VolumeConfig) string
- type NFS
- func (n *NFS) Create(ctx context.Context, rsc *ResourceConfig) (*ResourceConfig, error)
- func (n *NFS) Delete(ctx context.Context, name string) error
- func (n *NFS) DeleteVolume(ctx context.Context, name string, lun int) (*ResourceConfig, error)
- func (n *NFS) Get(ctx context.Context, name string) (*ResourceConfig, error)
- func (n *NFS) List(ctx context.Context) ([]*ResourceConfig, error)
- func (n *NFS) Start(ctx context.Context, name string) (*ResourceConfig, error)
- func (n *NFS) Stop(ctx context.Context, name string) (*ResourceConfig, error)
- type ResourceConfig
- func (r *ResourceConfig) FillDefaults()
- func (r *ResourceConfig) ID() string
- func (r *ResourceConfig) Matches(o *ResourceConfig) bool
- func (r *ResourceConfig) ToPromoter(deployment []client.ResourceWithVolumes) (*reactor.PromoterConfig, error)
- func (r *ResourceConfig) Valid() error
- func (r *ResourceConfig) VolumeConfig(number int) *common.Volume
- type VolumeConfig
Constants ¶
View Source
const ( ExportBasePath = "/srv/gateway-exports" DefaultNFSPort = 2049 )
View Source
const IDFormat = "nfs-%s"
Variables ¶
Functions ¶
func ExportPath ¶
func ExportPath(rsc *ResourceConfig, vol *VolumeConfig) string
ExportPath returns the full path under which the resource is exported.
Types ¶
type NFS ¶
type NFS struct {
// contains filtered or unexported fields
}
func (*NFS) Create ¶
func (n *NFS) Create(ctx context.Context, rsc *ResourceConfig) (*ResourceConfig, error)
Create creates an NFS export according to the resource configuration described in rsc. It automatically prepends a "cluster private volume" to the list of volumes, so volume numbers must start at 1.
func (*NFS) DeleteVolume ¶
type ResourceConfig ¶
type ResourceConfig struct { Name string `json:"name"` ServiceIP common.IpCidr `json:"service_ip,omitempty"` AllowedIPs []common.IpCidr `json:"allowed_ips,omitempty"` ResourceGroup string `json:"resource_group"` Volumes []VolumeConfig `json:"volumes"` Status common.ResourceStatus `json:"status"` GrossSize bool `json:"gross_size"` }
func FromPromoter ¶
func FromPromoter(cfg *reactor.PromoterConfig, definition *client.ResourceDefinition, volumeDefinition []client.VolumeDefinition) (*ResourceConfig, error)
func (*ResourceConfig) FillDefaults ¶
func (r *ResourceConfig) FillDefaults()
func (*ResourceConfig) ID ¶
func (r *ResourceConfig) ID() string
func (*ResourceConfig) Matches ¶
func (r *ResourceConfig) Matches(o *ResourceConfig) bool
func (*ResourceConfig) ToPromoter ¶
func (r *ResourceConfig) ToPromoter(deployment []client.ResourceWithVolumes) (*reactor.PromoterConfig, error)
func (*ResourceConfig) Valid ¶
func (r *ResourceConfig) Valid() error
func (*ResourceConfig) VolumeConfig ¶
func (r *ResourceConfig) VolumeConfig(number int) *common.Volume
type VolumeConfig ¶
type VolumeConfig struct { common.VolumeConfig ExportPath string `json:"export_path"` }
VolumeConfig adds an export path in addition to the LINSTOR common.VolumeConfig.
Click to show internal directories.
Click to hide internal directories.