Documentation
¶
Overview ¶
Package storage provides S3-backed file transfer functionality for template provisioning.
This package implements multipart upload/download with progress tracking, resume capability, and checksum verification for large file transfers during template provisioning.
Package storage provides advanced storage integration for Prism.
This package implements high-performance storage solutions including FSx filesystems, S3 mount points, and comprehensive storage analytics for research workloads.
Index ¶
- Constants
- type AccessPointConfig
- type AccessPointInfo
- type AnalyticsManager
- func (m *AnalyticsManager) AnalyzeUsagePatterns(req AnalyticsRequest) (*UsageAnalysis, error)
- func (m *AnalyticsManager) GetMultiTierStorageRecommendations(req AnalyticsRequest) (*TierRecommendation, error)
- func (m *AnalyticsManager) GetPerformanceMetrics(req AnalyticsRequest) (*PerformanceMetrics, error)
- func (m *AnalyticsManager) GetStorageAnalytics(req AnalyticsRequest) (*CostAnalysis, error)
- func (m *AnalyticsManager) GetStorageCostAnalysis(req AnalyticsRequest) (*CostAnalysis, error)
- func (m *AnalyticsManager) GetUsagePatternAnalysis(req AnalyticsRequest) (*UsageAnalysis, error)
- func (m *AnalyticsManager) MonitorStorageHealth(req AnalyticsRequest) (*HealthStatus, error)
- func (m *AnalyticsManager) OptimizeStorageConfiguration(storageType StorageType, currentConfig interface{}) (*OptimizationResult, error)
- type AnalyticsPeriod
- type AnalyticsRequest
- type AnalyticsResult
- type CostAnalysis
- type CostEstimate
- type CostOptimizationSuggestion
- type DataRepositoryInfo
- type DirectoryUsage
- type EBSConfiguration
- type EBSManager
- func (m *EBSManager) AttachEBSVolume(volumeName, instanceID string) error
- func (m *EBSManager) CreateEBSVolume(req StorageRequest) (*StorageInfo, error)
- func (m *EBSManager) CreateSnapshot(volumeName, description string) (*SnapshotInfo, error)
- func (m *EBSManager) DeleteEBSVolume(name string) error
- func (m *EBSManager) DetachEBSVolume(volumeName, instanceID string) error
- func (m *EBSManager) GetEBSMetrics(volumeId string) (*EBSMetrics, error)
- func (m *EBSManager) GetInstallScript() string
- func (m *EBSManager) GetMountCommand(volumeId string, mountPoint string, config *EBSConfiguration) string
- func (m *EBSManager) ListEBSVolumes() ([]StorageInfo, error)
- func (m *EBSManager) ListSnapshots() ([]SnapshotInfo, error)
- func (m *EBSManager) OptimizeForWorkload(volumeId string, workload EBSWorkloadType) error
- type EBSMetrics
- type EBSWorkloadType
- type EFSConfiguration
- type EFSManager
- func (m *EFSManager) CreateAccessPoint(filesystemId, path string, posixUser *PosixUser) (*AccessPointInfo, error)
- func (m *EFSManager) CreateEFSFilesystem(req StorageRequest) (*StorageInfo, error)
- func (m *EFSManager) CreateMountTarget(filesystemId, subnetId string) (*string, error)
- func (m *EFSManager) DeleteEFSFilesystem(name string) error
- func (m *EFSManager) GetEFSMetrics(filesystemId string) (*EFSMetrics, error)
- func (m *EFSManager) GetInstallScript() string
- func (m *EFSManager) GetMountCommand(filesystemId string, mountPoint string) string
- func (m *EFSManager) GetMountTargets(filesystemId string) ([]string, error)
- func (m *EFSManager) ListAccessPoints(filesystemId string) ([]AccessPointInfo, error)
- func (m *EFSManager) ListEFSFilesystems() ([]StorageInfo, error)
- func (m *EFSManager) OptimizeForWorkload(filesystemId string, workload EFSWorkloadType) error
- type EFSMetrics
- type EFSWorkloadType
- type FSxConfiguration
- type FSxFilesystemType
- type FSxInfo
- type FSxManager
- func (m *FSxManager) CreateFSxFilesystem(req StorageRequest) (*StorageInfo, error)
- func (m *FSxManager) DeleteFSxFilesystem(name string, skipFinalBackup bool) error
- func (m *FSxManager) GetInstallScript() string
- func (m *FSxManager) GetMountCommand(filesystemType FSxType, filesystemId string, mountPoint string) string
- func (m *FSxManager) ListFSxFilesystems() ([]StorageInfo, error)
- func (m *FSxManager) OptimizeForWorkload(filesystemId string, workload string) error
- type FSxType
- type FSxWorkloadType
- type FileTypeUsage
- type HealthStatus
- type LustreConfiguration
- type LustreInfo
- type LustreLogConfiguration
- type MetricData
- type MountRequest
- type MountTargetInfo
- type MultiTierStorageConfig
- type MultiTierStorageInfo
- type NetAppConfiguration
- type NetAppDiskIopsConfiguration
- type OptimizationPriority
- type OptimizationRecommendation
- type OptimizationResult
- type OptimizationType
- type PatternRecommendation
- type PerformanceMetrics
- type PosixUser
- type Recommendation
- type ResourceHealth
- type ResourceUsagePattern
- type S3Configuration
- type S3Info
- type S3Manager
- func (m *S3Manager) CreateS3MountPoint(req StorageRequest) (*StorageInfo, error)
- func (m *S3Manager) DeleteS3MountPoint(name string) error
- func (m *S3Manager) GetBucketMetrics(bucketName string) (*S3Metrics, error)
- func (m *S3Manager) GetInstallScript(method S3MountMethod) string
- func (m *S3Manager) GetMountCommand(bucketName string, mountPoint string, method S3MountMethod) string
- func (m *S3Manager) ListS3MountPoints() ([]StorageInfo, error)
- func (m *S3Manager) OptimizeBucketForWorkload(bucketName string, workload string) error
- type S3Metrics
- type S3MountConfig
- type S3MountMethod
- type S3WorkloadType
- type SelfManagedActiveDirectory
- type ServiceCost
- type SnapshotInfo
- type StorageAccessPatterns
- type StorageAnalytics
- type StorageCostStats
- type StorageHealthIssue
- type StorageHealthReport
- type StorageInfo
- type StorageManager
- func (m *StorageManager) AttachStorageToInstance(storageName string, storageType StorageType, instanceID string) error
- func (m *StorageManager) CreateMultiTierStorage(name string, config MultiTierStorageConfig) (*MultiTierStorageInfo, error)
- func (m *StorageManager) CreateStorage(req StorageRequest) (*StorageInfo, error)
- func (m *StorageManager) DeleteStorage(name string, storageType StorageType) error
- func (m *StorageManager) DetachStorageFromInstance(storageName string, storageType StorageType, instanceID string) error
- func (m *StorageManager) GetInstallScript(storageType StorageType, options ...interface{}) (string, error)
- func (m *StorageManager) GetMountCommand(name string, storageType StorageType, mountPoint string) (string, error)
- func (m *StorageManager) GetStorageAnalytics(period AnalyticsPeriod, resources []string) (*CostAnalysis, error)
- func (m *StorageManager) GetStorageHealth() (*StorageHealthReport, error)
- func (m *StorageManager) GetStorageRecommendations() ([]OptimizationRecommendation, error)
- func (m *StorageManager) GetUsagePatterns(resources []string, days int) (*UsagePatternAnalysis, error)
- func (m *StorageManager) ListStorage() ([]StorageInfo, error)
- func (m *StorageManager) ListStorageByType(storageType StorageType) ([]StorageInfo, error)
- func (m *StorageManager) OptimizeStorageForWorkload(name string, storageType StorageType, workload WorkloadType) error
- type StorageMetrics
- type StoragePerformanceStats
- type StorageRequest
- type StorageResource
- type StorageType
- type StorageUsageStats
- type TierInfo
- type TierRecommendation
- type TimeRange
- type TransferManager
- func (tm *TransferManager) CancelTransfer(transferID string) error
- func (tm *TransferManager) DeleteObject(ctx context.Context, bucket, key string) error
- func (tm *TransferManager) DownloadFile(ctx context.Context, bucket, key, localPath string) (*TransferProgress, error)
- func (tm *TransferManager) GetTransferProgress(transferID string) (*TransferProgress, bool)
- func (tm *TransferManager) ListTransfers() []*TransferProgress
- func (tm *TransferManager) UploadFile(ctx context.Context, localPath, bucket, key string) (*TransferProgress, error)
- type TransferOptions
- type TransferProgress
- type TransferStatus
- type TransferType
- type UsageAnalysis
- type UsageDataPoint
- type UsagePattern
- type UsagePatternAnalysis
- type UserAccessPattern
- type WindowsAuditLogConfiguration
- type WindowsConfiguration
- type WorkloadType
- type ZFSClientConfiguration
- type ZFSConfiguration
- type ZFSDiskIopsConfiguration
- type ZFSInfo
- type ZFSNfsExport
- type ZFSRootVolumeConfiguration
- type ZFSUserGroupQuota
- type ZFSVolumeInfo
Constants ¶
const ( // MinPartSize is the minimum size for multipart upload chunks (5MB per AWS requirement) MinPartSize = 5 * 1024 * 1024 // DefaultPartSize is the default chunk size for multipart uploads (10MB) DefaultPartSize = 10 * 1024 * 1024 // MaxPartSize is the maximum chunk size for multipart uploads (100MB) MaxPartSize = 100 * 1024 * 1024 // DefaultConcurrency is the default number of concurrent uploads/downloads DefaultConcurrency = 5 // TransferTimeout is the maximum time for a complete transfer operation TransferTimeout = 1 * time.Hour // CheckpointInterval is how often to save transfer progress for resume CheckpointInterval = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPointConfig ¶
type AccessPointConfig struct {
Path string `json:"path" yaml:"path"`
PosixUser *PosixUser `json:"posix_user,omitempty" yaml:"posix_user,omitempty"`
}
AccessPointConfig defines EFS access point configuration
type AccessPointInfo ¶
type AnalyticsManager ¶
type AnalyticsManager struct {
// contains filtered or unexported fields
}
AnalyticsManager provides storage analytics and cost optimization
func NewAnalyticsManager ¶
func NewAnalyticsManager(cfg aws.Config) *AnalyticsManager
NewAnalyticsManager creates a new analytics manager
func (*AnalyticsManager) AnalyzeUsagePatterns ¶
func (m *AnalyticsManager) AnalyzeUsagePatterns(req AnalyticsRequest) (*UsageAnalysis, error)
AnalyzeUsagePatterns analyzes storage usage patterns for optimization
func (*AnalyticsManager) GetMultiTierStorageRecommendations ¶
func (m *AnalyticsManager) GetMultiTierStorageRecommendations(req AnalyticsRequest) (*TierRecommendation, error)
GetMultiTierStorageRecommendations provides intelligent tiering recommendations
func (*AnalyticsManager) GetPerformanceMetrics ¶
func (m *AnalyticsManager) GetPerformanceMetrics(req AnalyticsRequest) (*PerformanceMetrics, error)
GetPerformanceMetrics retrieves performance metrics for storage resources
func (*AnalyticsManager) GetStorageAnalytics ¶
func (m *AnalyticsManager) GetStorageAnalytics(req AnalyticsRequest) (*CostAnalysis, error)
GetStorageAnalytics provides comprehensive storage analytics (alias for backward compatibility)
func (*AnalyticsManager) GetStorageCostAnalysis ¶
func (m *AnalyticsManager) GetStorageCostAnalysis(req AnalyticsRequest) (*CostAnalysis, error)
GetStorageCostAnalysis provides cost analysis for storage resources
func (*AnalyticsManager) GetUsagePatternAnalysis ¶
func (m *AnalyticsManager) GetUsagePatternAnalysis(req AnalyticsRequest) (*UsageAnalysis, error)
GetUsagePatternAnalysis analyzes usage patterns for storage optimization
func (*AnalyticsManager) MonitorStorageHealth ¶
func (m *AnalyticsManager) MonitorStorageHealth(req AnalyticsRequest) (*HealthStatus, error)
MonitorStorageHealth provides health monitoring for storage resources
func (*AnalyticsManager) OptimizeStorageConfiguration ¶
func (m *AnalyticsManager) OptimizeStorageConfiguration(storageType StorageType, currentConfig interface{}) (*OptimizationResult, error)
OptimizeStorageConfiguration provides optimization recommendations
type AnalyticsPeriod ¶
type AnalyticsPeriod string
const ( AnalyticsPeriodDaily AnalyticsPeriod = "daily" AnalyticsPeriodWeekly AnalyticsPeriod = "weekly" AnalyticsPeriodMonthly AnalyticsPeriod = "monthly" AnalyticsPeriodYearly AnalyticsPeriod = "yearly" )
type AnalyticsRequest ¶
type AnalyticsRequest struct {
Resources []StorageResource `json:"resources"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Period AnalyticsPeriod `json:"period"`
}
Analytics types for storage analysis
type AnalyticsResult ¶
type AnalyticsResult struct {
Period AnalyticsPeriod `json:"period"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Metrics map[string]StorageMetrics `json:"metrics"`
CostAnalysis CostAnalysis `json:"cost_analysis"`
Recommendations []OptimizationRecommendation `json:"recommendations"`
}
type CostAnalysis ¶
type CostEstimate ¶
type CostOptimizationSuggestion ¶
type CostOptimizationSuggestion struct {
Type string `json:"type" yaml:"type"` // storage_class, throughput, cleanup
Description string `json:"description" yaml:"description"`
PotentialSavings float64 `json:"potential_savings" yaml:"potential_savings"` // Monthly savings in USD
Effort string `json:"effort" yaml:"effort"` // low, medium, high
Impact string `json:"impact" yaml:"impact"` // low, medium, high
Action string `json:"action" yaml:"action"` // Specific action to take
}
CostOptimizationSuggestion contains cost optimization recommendations
type DataRepositoryInfo ¶
type DataRepositoryInfo struct {
ImportPath string `json:"import_path,omitempty" yaml:"import_path,omitempty"`
ExportPath string `json:"export_path,omitempty" yaml:"export_path,omitempty"`
ImportedFileChunkSize int32 `json:"imported_file_chunk_size,omitempty" yaml:"imported_file_chunk_size,omitempty"`
}
DataRepositoryInfo contains data repository information
type DirectoryUsage ¶
type DirectoryUsage struct {
Path string `json:"path" yaml:"path"`
SizeBytes int64 `json:"size_bytes" yaml:"size_bytes"`
FileCount int64 `json:"file_count" yaml:"file_count"`
Percentage float64 `json:"percentage" yaml:"percentage"`
}
DirectoryUsage contains directory usage information
type EBSConfiguration ¶
type EBSConfiguration struct {
// Volume configuration
VolumeType string `json:"volume_type,omitempty" yaml:"volume_type,omitempty"` // gp2, gp3, io1, io2, st1, sc1
IOPS int32 `json:"iops,omitempty" yaml:"iops,omitempty"` // Provisioned IOPS
Throughput int32 `json:"throughput,omitempty" yaml:"throughput,omitempty"` // MB/s (for gp3, st1, sc1)
AvailabilityZone string `json:"availability_zone,omitempty" yaml:"availability_zone,omitempty"`
// Snapshot configuration
SnapshotID string `json:"snapshot_id,omitempty" yaml:"snapshot_id,omitempty"`
// Encryption
Encrypted bool `json:"encrypted,omitempty" yaml:"encrypted,omitempty"`
KmsKeyId string `json:"kms_key_id,omitempty" yaml:"kms_key_id,omitempty"`
// Filesystem
Filesystem string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` // ext4, xfs, etc.
// Multi-attach (io1/io2 only)
MultiAttachEnabled bool `json:"multi_attach_enabled,omitempty" yaml:"multi_attach_enabled,omitempty"`
}
EBSConfiguration contains EBS-specific settings
type EBSManager ¶
type EBSManager struct {
// contains filtered or unexported fields
}
EBSManager handles EBS operations for Prism
func NewEBSManager ¶
func NewEBSManager(cfg aws.Config) *EBSManager
NewEBSManager creates a new EBS manager instance
func (*EBSManager) AttachEBSVolume ¶
func (m *EBSManager) AttachEBSVolume(volumeName, instanceID string) error
AttachEBSVolume attaches an EBS volume to an EC2 instance
func (*EBSManager) CreateEBSVolume ¶
func (m *EBSManager) CreateEBSVolume(req StorageRequest) (*StorageInfo, error)
CreateEBSVolume creates a new EBS volume
func (*EBSManager) CreateSnapshot ¶
func (m *EBSManager) CreateSnapshot(volumeName, description string) (*SnapshotInfo, error)
CreateSnapshot creates a snapshot of an EBS volume
func (*EBSManager) DeleteEBSVolume ¶
func (m *EBSManager) DeleteEBSVolume(name string) error
DeleteEBSVolume deletes an EBS volume
func (*EBSManager) DetachEBSVolume ¶
func (m *EBSManager) DetachEBSVolume(volumeName, instanceID string) error
DetachEBSVolume detaches an EBS volume from an EC2 instance
func (*EBSManager) GetEBSMetrics ¶
func (m *EBSManager) GetEBSMetrics(volumeId string) (*EBSMetrics, error)
GetEBSMetrics retrieves basic EBS metrics
func (*EBSManager) GetInstallScript ¶
func (m *EBSManager) GetInstallScript() string
GetInstallScript returns the EBS utilities installation script (minimal for EBS)
func (*EBSManager) GetMountCommand ¶
func (m *EBSManager) GetMountCommand(volumeId string, mountPoint string, config *EBSConfiguration) string
GetMountCommand generates the EBS volume mount command
func (*EBSManager) ListEBSVolumes ¶
func (m *EBSManager) ListEBSVolumes() ([]StorageInfo, error)
ListEBSVolumes lists all Prism EBS volumes
func (*EBSManager) ListSnapshots ¶
func (m *EBSManager) ListSnapshots() ([]SnapshotInfo, error)
ListSnapshots lists EBS snapshots created by Prism
func (*EBSManager) OptimizeForWorkload ¶
func (m *EBSManager) OptimizeForWorkload(volumeId string, workload EBSWorkloadType) error
OptimizeForWorkload applies workload-specific optimizations to EBS
type EBSMetrics ¶
type EBSMetrics struct {
VolumeId string `json:"volume_id"`
VolumeType string `json:"volume_type"`
Size int64 `json:"size"`
State string `json:"state"`
IOPS int32 `json:"iops"`
Throughput int32 `json:"throughput"`
Encrypted bool `json:"encrypted"`
LastUpdated time.Time `json:"last_updated"`
}
EBS-specific types
type EBSWorkloadType ¶
type EBSWorkloadType string
EBSWorkloadType defines EBS optimization workload types
const ( EBSWorkloadGeneral EBSWorkloadType = "general" EBSWorkloadML EBSWorkloadType = "ml" EBSWorkloadBigData EBSWorkloadType = "bigdata" )
type EFSConfiguration ¶
type EFSConfiguration struct {
// Performance configuration
PerformanceMode string `json:"performance_mode,omitempty" yaml:"performance_mode,omitempty"` // generalPurpose, maxIO
ThroughputMode string `json:"throughput_mode,omitempty" yaml:"throughput_mode,omitempty"` // bursting, provisioned
ProvisionedThroughput float64 `json:"provisioned_throughput,omitempty" yaml:"provisioned_throughput,omitempty"` // MiB/s
// Availability and durability
AvailabilityZone string `json:"availability_zone,omitempty" yaml:"availability_zone,omitempty"`
// Access points
AccessPoints []AccessPointConfig `json:"access_points,omitempty" yaml:"access_points,omitempty"`
// Backup configuration
BackupPolicy bool `json:"backup_policy,omitempty" yaml:"backup_policy,omitempty"`
}
EFSConfiguration contains EFS-specific settings
type EFSManager ¶
type EFSManager struct {
// contains filtered or unexported fields
}
EFSManager handles EFS operations for Prism
func NewEFSManager ¶
func NewEFSManager(cfg aws.Config) *EFSManager
NewEFSManager creates a new EFS manager instance
func (*EFSManager) CreateAccessPoint ¶
func (m *EFSManager) CreateAccessPoint(filesystemId, path string, posixUser *PosixUser) (*AccessPointInfo, error)
CreateAccessPoint creates an EFS access point
func (*EFSManager) CreateEFSFilesystem ¶
func (m *EFSManager) CreateEFSFilesystem(req StorageRequest) (*StorageInfo, error)
CreateEFSFilesystem creates a new EFS filesystem
func (*EFSManager) CreateMountTarget ¶
func (m *EFSManager) CreateMountTarget(filesystemId, subnetId string) (*string, error)
CreateMountTarget creates a mount target in a specific subnet
func (*EFSManager) DeleteEFSFilesystem ¶
func (m *EFSManager) DeleteEFSFilesystem(name string) error
DeleteEFSFilesystem deletes an EFS filesystem
func (*EFSManager) GetEFSMetrics ¶
func (m *EFSManager) GetEFSMetrics(filesystemId string) (*EFSMetrics, error)
GetEFSMetrics retrieves basic EFS metrics
func (*EFSManager) GetInstallScript ¶
func (m *EFSManager) GetInstallScript() string
GetInstallScript returns the EFS utilities installation script
func (*EFSManager) GetMountCommand ¶
func (m *EFSManager) GetMountCommand(filesystemId string, mountPoint string) string
GetMountCommand generates the EFS mount command
func (*EFSManager) GetMountTargets ¶
func (m *EFSManager) GetMountTargets(filesystemId string) ([]string, error)
GetMountTargets returns mount targets for an EFS filesystem
func (*EFSManager) ListAccessPoints ¶
func (m *EFSManager) ListAccessPoints(filesystemId string) ([]AccessPointInfo, error)
ListAccessPoints lists EFS access points for a filesystem
func (*EFSManager) ListEFSFilesystems ¶
func (m *EFSManager) ListEFSFilesystems() ([]StorageInfo, error)
ListEFSFilesystems lists all Prism EFS filesystems
func (*EFSManager) OptimizeForWorkload ¶
func (m *EFSManager) OptimizeForWorkload(filesystemId string, workload EFSWorkloadType) error
OptimizeForWorkload applies workload-specific optimizations to EFS
type EFSMetrics ¶
type EFSMetrics struct {
FilesystemId string `json:"filesystem_id"`
SizeInBytes int64 `json:"size_in_bytes"`
PerformanceMode string `json:"performance_mode"`
ThroughputMode string `json:"throughput_mode"`
ProvisionedThroughput float64 `json:"provisioned_throughput"`
LastUpdated time.Time `json:"last_updated"`
}
EFS-specific types
type EFSWorkloadType ¶
type EFSWorkloadType string
EFSWorkloadType defines EFS optimization workload types
const ( EFSWorkloadGeneral EFSWorkloadType = "general" EFSWorkloadML EFSWorkloadType = "ml" EFSWorkloadBigData EFSWorkloadType = "bigdata" )
type FSxConfiguration ¶
type FSxConfiguration struct {
// Filesystem type
FilesystemType FSxFilesystemType `json:"filesystem_type" yaml:"filesystem_type"`
// Capacity and performance
StorageCapacity int32 `json:"storage_capacity" yaml:"storage_capacity"` // GB
ThroughputCapacity int32 `json:"throughput_capacity,omitempty" yaml:"throughput_capacity,omitempty"` // MB/s
PerSecondThroughput int32 `json:"per_unit_throughput,omitempty" yaml:"per_unit_throughput,omitempty"`
// Networking
SubnetIds []string `json:"subnet_ids" yaml:"subnet_ids"`
SecurityGroupIds []string `json:"security_group_ids,omitempty" yaml:"security_group_ids,omitempty"`
PreferredSubnetId string `json:"preferred_subnet_id,omitempty" yaml:"preferred_subnet_id,omitempty"`
// Backup configuration
AutomaticBackupRetention int32 `json:"automatic_backup_retention,omitempty" yaml:"automatic_backup_retention,omitempty"` // Days
CopyTagsToBackups bool `json:"copy_tags_to_backups,omitempty" yaml:"copy_tags_to_backups,omitempty"`
DailyBackupTime string `json:"daily_backup_time,omitempty" yaml:"daily_backup_time,omitempty"` // HH:MM format
// Lustre-specific configuration
LustreConfig *LustreConfiguration `json:"lustre_config,omitempty" yaml:"lustre_config,omitempty"`
// OpenZFS-specific configuration
ZFSConfig *ZFSConfiguration `json:"zfs_config,omitempty" yaml:"zfs_config,omitempty"`
// Windows-specific configuration
WindowsConfig *WindowsConfiguration `json:"windows_config,omitempty" yaml:"windows_config,omitempty"`
// NetApp-specific configuration
NetAppConfig *NetAppConfiguration `json:"netapp_config,omitempty" yaml:"netapp_config,omitempty"`
}
FSxConfiguration contains FSx-specific settings
type FSxFilesystemType ¶
type FSxFilesystemType string
FSxFilesystemType defines FSx filesystem types
const ( FSxTypeLustre FSxFilesystemType = "lustre" // High-performance computing FSxTypeWindows FSxFilesystemType = "windows" // Windows File Server FSxTypeZFS FSxFilesystemType = "zfs" // OpenZFS FSxTypeOpenZFS FSxFilesystemType = "openzfs" // OpenZFS (alternate name) FSxTypeNetApp FSxFilesystemType = "netapp" // NetApp ONTAP // Alias for manager.go compatibility FSxFilesystemTypeLustre = FSxTypeLustre )
type FSxInfo ¶
type FSxInfo struct {
FilesystemType FSxFilesystemType `json:"filesystem_type" yaml:"filesystem_type"`
StorageCapacity int32 `json:"storage_capacity" yaml:"storage_capacity"`
ThroughputCapacity int32 `json:"throughput_capacity,omitempty" yaml:"throughput_capacity,omitempty"`
// Lustre-specific info
LustreInfo *LustreInfo `json:"lustre_info,omitempty" yaml:"lustre_info,omitempty"`
// ZFS-specific info
ZFSInfo *ZFSInfo `json:"zfs_info,omitempty" yaml:"zfs_info,omitempty"`
}
FSxInfo contains FSx-specific information
type FSxManager ¶
type FSxManager struct {
// contains filtered or unexported fields
}
FSxManager handles Amazon FSx operations for Prism
func NewFSxManager ¶
func NewFSxManager(cfg aws.Config) *FSxManager
NewFSxManager creates a new FSx manager instance
func (*FSxManager) CreateFSxFilesystem ¶
func (m *FSxManager) CreateFSxFilesystem(req StorageRequest) (*StorageInfo, error)
CreateFSxFilesystem creates a new FSx filesystem
func (*FSxManager) DeleteFSxFilesystem ¶
func (m *FSxManager) DeleteFSxFilesystem(name string, skipFinalBackup bool) error
DeleteFSxFilesystem deletes an FSx filesystem
func (*FSxManager) GetInstallScript ¶
func (m *FSxManager) GetInstallScript() string
GetInstallScript returns installation script for FSx clients
func (*FSxManager) GetMountCommand ¶
func (m *FSxManager) GetMountCommand(filesystemType FSxType, filesystemId string, mountPoint string) string
GetMountCommand generates the FSx mount command
func (*FSxManager) ListFSxFilesystems ¶
func (m *FSxManager) ListFSxFilesystems() ([]StorageInfo, error)
ListFSxFilesystems lists all Prism FSx filesystems
func (*FSxManager) OptimizeForWorkload ¶
func (m *FSxManager) OptimizeForWorkload(filesystemId string, workload string) error
OptimizeForWorkload optimizes FSx filesystem for specific workloads
type FSxType ¶
type FSxType = FSxFilesystemType // Alias for compatibility
type FSxWorkloadType ¶
type FSxWorkloadType string
FSxWorkloadType defines FSx-specific workload optimization types
const ( FSxWorkloadGeneral FSxWorkloadType = "general" FSxWorkloadHPC FSxWorkloadType = "hpc" FSxWorkloadBigData FSxWorkloadType = "bigdata" )
type FileTypeUsage ¶
type FileTypeUsage struct {
Extension string `json:"extension" yaml:"extension"`
SizeBytes int64 `json:"size_bytes" yaml:"size_bytes"`
FileCount int64 `json:"file_count" yaml:"file_count"`
Percentage float64 `json:"percentage" yaml:"percentage"`
}
FileTypeUsage contains file type usage information
type HealthStatus ¶
type HealthStatus struct {
OverallStatus string `json:"overall_status"`
Resources []ResourceHealth `json:"resources"`
Alerts []string `json:"alerts"`
LastUpdated time.Time `json:"last_updated"`
}
type LustreConfiguration ¶
type LustreConfiguration struct {
// Data repository configuration
ImportPath string `json:"import_path,omitempty" yaml:"import_path,omitempty"` // S3 bucket path
ExportPath string `json:"export_path,omitempty" yaml:"export_path,omitempty"` // S3 export path
ImportedFileChunkSize int32 `json:"imported_file_chunk_size,omitempty" yaml:"imported_file_chunk_size,omitempty"` // MiB
// Deployment type
DeploymentType string `json:"deployment_type,omitempty" yaml:"deployment_type,omitempty"` // SCRATCH_1, SCRATCH_2, PERSISTENT_1, PERSISTENT_2
// Drive cache type for persistent filesystems
DriveCacheType string `json:"drive_cache_type,omitempty" yaml:"drive_cache_type,omitempty"` // NONE, READ
// Data compression
DataCompression string `json:"data_compression,omitempty" yaml:"data_compression,omitempty"` // LZ4
// Log configuration
LogConfiguration *LustreLogConfiguration `json:"log_configuration,omitempty" yaml:"log_configuration,omitempty"`
}
LustreConfiguration contains Lustre-specific settings
type LustreInfo ¶
type LustreInfo struct {
DeploymentType string `json:"deployment_type" yaml:"deployment_type"`
MountName string `json:"mount_name,omitempty" yaml:"mount_name,omitempty"`
DataRepositoryInfo *DataRepositoryInfo `json:"data_repository_info,omitempty" yaml:"data_repository_info,omitempty"`
}
LustreInfo contains Lustre filesystem information
type LustreLogConfiguration ¶
type LustreLogConfiguration struct {
Level string `json:"level" yaml:"level"` // DISABLED, WARN_ONLY, ERROR_ONLY
Destination string `json:"destination,omitempty" yaml:"destination,omitempty"` // CloudWatch log group
}
LustreLogConfiguration contains Lustre logging settings
type MetricData ¶
type MountRequest ¶
type MountRequest struct {
// Target configuration
StorageName string `json:"storage_name" yaml:"storage_name"`
InstanceName string `json:"instance_name" yaml:"instance_name"`
MountPoint string `json:"mount_point" yaml:"mount_point"`
// Mount options
MountOptions []string `json:"mount_options,omitempty" yaml:"mount_options,omitempty"`
ReadOnly bool `json:"read_only,omitempty" yaml:"read_only,omitempty"`
// User and group configuration
UserId int32 `json:"user_id,omitempty" yaml:"user_id,omitempty"`
GroupId int32 `json:"group_id,omitempty" yaml:"group_id,omitempty"`
Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"` // e.g., "755"
// Type-specific mount configuration
S3MountConfig *S3MountConfig `json:"s3_mount_config,omitempty" yaml:"s3_mount_config,omitempty"`
}
MountRequest represents a storage mount request
type MountTargetInfo ¶
type MountTargetInfo struct {
Id string `json:"id" yaml:"id"`
SubnetId string `json:"subnet_id" yaml:"subnet_id"`
IPAddress string `json:"ip_address" yaml:"ip_address"`
AvailabilityZone string `json:"availability_zone" yaml:"availability_zone"`
State string `json:"state" yaml:"state"`
}
MountTargetInfo contains mount target details
type MultiTierStorageConfig ¶
type MultiTierStorageConfig struct {
HotTier *StorageRequest `json:"hot_tier,omitempty"`
WarmTier *StorageRequest `json:"warm_tier,omitempty"`
ColdTier *StorageRequest `json:"cold_tier,omitempty"`
}
Multi-tier storage types
type MultiTierStorageInfo ¶
type MultiTierStorageInfo struct {
Name string `json:"name"`
CreationTime time.Time `json:"creation_time"`
Tiers map[string]StorageInfo `json:"tiers"`
}
type NetAppConfiguration ¶
type NetAppConfiguration struct {
// Deployment type
DeploymentType string `json:"deployment_type,omitempty" yaml:"deployment_type,omitempty"` // MULTI_AZ_1, SINGLE_AZ_1
// Endpoint IP address range
EndpointIpAddressRange string `json:"endpoint_ip_address_range,omitempty" yaml:"endpoint_ip_address_range,omitempty"`
// FsxAdmin password
FsxAdminPassword string `json:"fsx_admin_password,omitempty" yaml:"fsx_admin_password,omitempty"`
// Preferred subnet
PreferredSubnetId string `json:"preferred_subnet_id,omitempty" yaml:"preferred_subnet_id,omitempty"`
// Route table IDs
RouteTableIds []string `json:"route_table_ids,omitempty" yaml:"route_table_ids,omitempty"`
// Weekly maintenance
WeeklyMaintenanceStartTime string `json:"weekly_maintenance_start_time,omitempty" yaml:"weekly_maintenance_start_time,omitempty"`
// Disk IOPS configuration
DiskIopsConfiguration *NetAppDiskIopsConfiguration `json:"disk_iops_configuration,omitempty" yaml:"disk_iops_configuration,omitempty"`
}
NetAppConfiguration contains NetApp ONTAP settings
type NetAppDiskIopsConfiguration ¶
type NetAppDiskIopsConfiguration struct {
Iops int32 `json:"iops,omitempty" yaml:"iops,omitempty"`
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` // AUTOMATIC, USER_PROVISIONED
}
NetAppDiskIopsConfiguration defines NetApp disk IOPS settings
type OptimizationPriority ¶
type OptimizationPriority string
const ( OptimizationPriorityLow OptimizationPriority = "low" OptimizationPriorityMedium OptimizationPriority = "medium" OptimizationPriorityHigh OptimizationPriority = "high" )
type OptimizationRecommendation ¶
type OptimizationRecommendation struct {
Type OptimizationType `json:"type"`
Priority OptimizationPriority `json:"priority"`
Resource string `json:"resource"`
Title string `json:"title"`
Description string `json:"description"`
PotentialSavings float64 `json:"potential_savings"`
ImplementationURL string `json:"implementation_url"`
}
type OptimizationResult ¶
type OptimizationResult struct {
StorageType StorageType `json:"storage_type"`
CurrentCost float64 `json:"current_cost"`
Recommendations []Recommendation `json:"recommendations"`
OptimalConfig interface{} `json:"optimal_config"`
LastUpdated time.Time `json:"last_updated"`
}
type OptimizationType ¶
type OptimizationType string
const ( OptimizationTypeCost OptimizationType = "cost" OptimizationTypePerformance OptimizationType = "performance" OptimizationTypeSecurity OptimizationType = "security" )
type PatternRecommendation ¶
type PerformanceMetrics ¶
type PerformanceMetrics struct {
TimeRange TimeRange `json:"time_range"`
IOPS MetricData `json:"iops"`
Throughput MetricData `json:"throughput"`
Latency MetricData `json:"latency"`
Utilization MetricData `json:"utilization"`
LastUpdated time.Time `json:"last_updated"`
}
type Recommendation ¶
type ResourceHealth ¶
type ResourceUsagePattern ¶
type ResourceUsagePattern struct {
ResourceName string `json:"resource_name"`
ResourceType StorageType `json:"resource_type"`
DataPoints []UsageDataPoint `json:"data_points"`
PeakUsageHours []int `json:"peak_usage_hours"`
UsageVariability float64 `json:"usage_variability"`
TrendDirection string `json:"trend_direction"`
}
type S3Configuration ¶
type S3Configuration struct {
// S3 bucket configuration
BucketName string `json:"bucket_name" yaml:"bucket_name"`
BucketRegion string `json:"bucket_region,omitempty" yaml:"bucket_region,omitempty"`
Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty"` // S3 key prefix
// Mount configuration
MountMethod S3MountMethod `json:"mount_method" yaml:"mount_method"`
MountOptions []string `json:"mount_options,omitempty" yaml:"mount_options,omitempty"`
// Access configuration
AccessMode string `json:"access_mode,omitempty" yaml:"access_mode,omitempty"` // ro, rw
RequesterPays bool `json:"requester_pays,omitempty" yaml:"requester_pays,omitempty"`
UseVirtualHosting bool `json:"use_virtual_hosting,omitempty" yaml:"use_virtual_hosting,omitempty"`
// Performance tuning
CacheSize int64 `json:"cache_size,omitempty" yaml:"cache_size,omitempty"` // Local cache size in MB
CacheDirectory string `json:"cache_directory,omitempty" yaml:"cache_directory,omitempty"`
ParallelRequests int32 `json:"parallel_requests,omitempty" yaml:"parallel_requests,omitempty"`
MultipartSize int64 `json:"multipart_size,omitempty" yaml:"multipart_size,omitempty"` // MB
// Security
UseIAMRole bool `json:"use_iam_role,omitempty" yaml:"use_iam_role,omitempty"`
AccessKeyId string `json:"access_key_id,omitempty" yaml:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty" yaml:"secret_access_key,omitempty"`
SessionToken string `json:"session_token,omitempty" yaml:"session_token,omitempty"`
}
S3Configuration contains S3 mount point settings
type S3Info ¶
type S3Info struct {
BucketName string `json:"bucket_name" yaml:"bucket_name"`
BucketRegion string `json:"bucket_region" yaml:"bucket_region"`
MountMethod S3MountMethod `json:"mount_method" yaml:"mount_method"`
AccessMode string `json:"access_mode" yaml:"access_mode"`
CacheSize int64 `json:"cache_size,omitempty" yaml:"cache_size,omitempty"`
}
S3Info contains S3 mount point information
type S3Manager ¶
type S3Manager struct {
// contains filtered or unexported fields
}
S3Manager handles S3 mount point operations for Prism
func NewS3Manager ¶
NewS3Manager creates a new S3 manager instance
func (*S3Manager) CreateS3MountPoint ¶
func (m *S3Manager) CreateS3MountPoint(req StorageRequest) (*StorageInfo, error)
CreateS3MountPoint creates a new S3 bucket for mounting
func (*S3Manager) DeleteS3MountPoint ¶
DeleteS3MountPoint deletes an S3 bucket
func (*S3Manager) GetBucketMetrics ¶
GetBucketMetrics retrieves S3 bucket metrics for analytics
func (*S3Manager) GetInstallScript ¶
func (m *S3Manager) GetInstallScript(method S3MountMethod) string
GetInstallScript returns the S3 mounting tools installation script
func (*S3Manager) GetMountCommand ¶
func (m *S3Manager) GetMountCommand(bucketName string, mountPoint string, method S3MountMethod) string
GetMountCommand generates the S3 mount command
func (*S3Manager) ListS3MountPoints ¶
func (m *S3Manager) ListS3MountPoints() ([]StorageInfo, error)
ListS3MountPoints lists all Prism S3 buckets
type S3Metrics ¶
type S3Metrics struct {
BucketName string `json:"bucket_name"`
ObjectCount int64 `json:"object_count"`
TotalSize int64 `json:"total_size"`
StorageClass string `json:"storage_class"`
CostPerMonth float64 `json:"cost_per_month"`
LastUpdated time.Time `json:"last_updated"`
}
S3-specific types
type S3MountConfig ¶
type S3MountConfig struct {
// Cache configuration
UseCache bool `json:"use_cache,omitempty" yaml:"use_cache,omitempty"`
CacheDirectory string `json:"cache_directory,omitempty" yaml:"cache_directory,omitempty"`
CacheTTL int32 `json:"cache_ttl,omitempty" yaml:"cache_ttl,omitempty"` // seconds
// Performance configuration
ParallelRequests int32 `json:"parallel_requests,omitempty" yaml:"parallel_requests,omitempty"`
MultipartSize int64 `json:"multipart_size,omitempty" yaml:"multipart_size,omitempty"`
StatCacheSize int32 `json:"stat_cache_size,omitempty" yaml:"stat_cache_size,omitempty"`
// Debug and logging
LogLevel string `json:"log_level,omitempty" yaml:"log_level,omitempty"` // crit, err, warn, info, debug
DebugS3 bool `json:"debug_s3,omitempty" yaml:"debug_s3,omitempty"`
DebugFuse bool `json:"debug_fuse,omitempty" yaml:"debug_fuse,omitempty"`
}
S3MountConfig contains S3-specific mount configuration
type S3MountMethod ¶
type S3MountMethod string
S3MountMethod defines S3 mounting mechanisms
const ( S3MountMethodS3FS S3MountMethod = "s3fs" // s3fs-fuse S3MountMethodGoofys S3MountMethod = "goofys" // Goofys S3MountMethodMountpoint S3MountMethod = "mountpoint" // AWS Mountpoint for Amazon S3 S3MountMethodRclone S3MountMethod = "rclone" // Rclone )
type S3WorkloadType ¶
type S3WorkloadType string
S3WorkloadType defines S3-specific workload optimization types
const ( S3WorkloadFrequentAccess S3WorkloadType = "frequent_access" S3WorkloadArchival S3WorkloadType = "archival" S3WorkloadBigData S3WorkloadType = "bigdata" )
type SelfManagedActiveDirectory ¶
type SelfManagedActiveDirectory struct {
DnsIps []string `json:"dns_ips" yaml:"dns_ips"`
DomainName string `json:"domain_name" yaml:"domain_name"`
FileSystemAdministrators []string `json:"file_system_administrators,omitempty" yaml:"file_system_administrators,omitempty"`
OrganizationalUnit string `json:"organizational_unit,omitempty" yaml:"organizational_unit,omitempty"`
Password string `json:"password" yaml:"password"`
Username string `json:"username" yaml:"username"`
}
SelfManagedActiveDirectory contains self-managed AD settings
type ServiceCost ¶
type SnapshotInfo ¶
type StorageAccessPatterns ¶
type StorageAccessPatterns struct {
// Access frequency
HotDataPercent float64 `json:"hot_data_percent" yaml:"hot_data_percent"` // Frequently accessed
WarmDataPercent float64 `json:"warm_data_percent" yaml:"warm_data_percent"` // Occasionally accessed
ColdDataPercent float64 `json:"cold_data_percent" yaml:"cold_data_percent"` // Rarely accessed
// Access timing
PeakAccessHours []int `json:"peak_access_hours" yaml:"peak_access_hours"` // Hours of day (0-23)
BusinessHoursAccess float64 `json:"business_hours_access" yaml:"business_hours_access"` // Percentage
// User access patterns
TopUsers []UserAccessPattern `json:"top_users,omitempty" yaml:"top_users,omitempty"`
// Application access patterns
ReadWriteRatio float64 `json:"read_write_ratio" yaml:"read_write_ratio"` // Read operations / Write operations
SequentialAccessPercent float64 `json:"sequential_access_percent" yaml:"sequential_access_percent"`
RandomAccessPercent float64 `json:"random_access_percent" yaml:"random_access_percent"`
}
StorageAccessPatterns contains storage access pattern analytics
type StorageAnalytics ¶
type StorageAnalytics struct {
// Basic information
StorageName string `json:"storage_name" yaml:"storage_name"`
Type StorageType `json:"type" yaml:"type"`
// Time range for analytics
StartTime time.Time `json:"start_time" yaml:"start_time"`
EndTime time.Time `json:"end_time" yaml:"end_time"`
// Usage statistics
Usage StorageUsageStats `json:"usage" yaml:"usage"`
// Performance metrics
Performance StoragePerformanceStats `json:"performance" yaml:"performance"`
// Cost analytics
Cost StorageCostStats `json:"cost" yaml:"cost"`
// Access patterns
AccessPatterns StorageAccessPatterns `json:"access_patterns" yaml:"access_patterns"`
}
StorageAnalytics contains comprehensive storage usage and performance analytics
type StorageCostStats ¶
type StorageCostStats struct {
// Base storage costs
StorageCost float64 `json:"storage_cost" yaml:"storage_cost"` // Total storage cost
ThroughputCost float64 `json:"throughput_cost,omitempty" yaml:"throughput_cost,omitempty"` // Throughput cost (FSx)
RequestCost float64 `json:"request_cost,omitempty" yaml:"request_cost,omitempty"` // Request cost (S3)
DataTransferCost float64 `json:"data_transfer_cost,omitempty" yaml:"data_transfer_cost,omitempty"`
// Total costs
TotalCost float64 `json:"total_cost" yaml:"total_cost"`
DailyCost float64 `json:"daily_cost" yaml:"daily_cost"`
ProjectedMonthlyCost float64 `json:"projected_monthly_cost" yaml:"projected_monthly_cost"`
// Cost optimization metrics
CostPerGB float64 `json:"cost_per_gb" yaml:"cost_per_gb"`
CostPerIOPS float64 `json:"cost_per_iops,omitempty" yaml:"cost_per_iops,omitempty"`
CostPerThroughput float64 `json:"cost_per_throughput,omitempty" yaml:"cost_per_throughput,omitempty"`
// Savings opportunities
PotentialSavings []CostOptimizationSuggestion `json:"potential_savings,omitempty" yaml:"potential_savings,omitempty"`
}
StorageCostStats contains storage cost analytics
type StorageHealthIssue ¶
type StorageHealthReport ¶
type StorageHealthReport struct {
Timestamp time.Time `json:"timestamp"`
OverallHealth string `json:"overall_health"`
ServiceHealth map[string]string `json:"service_health"`
Issues []StorageHealthIssue `json:"issues"`
}
Storage health monitoring types
type StorageInfo ¶
type StorageInfo struct {
// Basic information
Name string `json:"name" yaml:"name"`
Type StorageType `json:"type" yaml:"type"`
Id string `json:"id" yaml:"id"` // AWS resource ID
State string `json:"state" yaml:"state"` // Current state
Size int64 `json:"size,omitempty" yaml:"size,omitempty"`
// Network information
DNSName string `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
IPAddress string `json:"ip_address,omitempty" yaml:"ip_address,omitempty"`
MountTargets []MountTargetInfo `json:"mount_targets,omitempty" yaml:"mount_targets,omitempty"`
// Performance metrics
ThroughputCapacity int32 `json:"throughput_capacity,omitempty" yaml:"throughput_capacity,omitempty"`
IOPS int32 `json:"iops,omitempty" yaml:"iops,omitempty"`
PerformanceMode string `json:"performance_mode,omitempty" yaml:"performance_mode,omitempty"`
// Cost information
EstimatedMonthlyCost float64 `json:"estimated_monthly_cost" yaml:"estimated_monthly_cost"`
CostPerGB float64 `json:"cost_per_gb,omitempty" yaml:"cost_per_gb,omitempty"`
CostPerThroughput float64 `json:"cost_per_throughput,omitempty" yaml:"cost_per_throughput,omitempty"`
// Timestamps
CreatedAt time.Time `json:"created_at" yaml:"created_at"`
LastModified time.Time `json:"last_modified,omitempty" yaml:"last_modified,omitempty"`
// Tags and metadata
Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Type-specific information
FSxInfo *FSxInfo `json:"fsx_info,omitempty" yaml:"fsx_info,omitempty"`
S3Info *S3Info `json:"s3_info,omitempty" yaml:"s3_info,omitempty"`
EFSConfig *EFSConfiguration `json:"efs_config,omitempty" yaml:"efs_config,omitempty"`
EBSConfig *EBSConfiguration `json:"ebs_config,omitempty" yaml:"ebs_config,omitempty"`
S3Config *S3Configuration `json:"s3_config,omitempty" yaml:"s3_config,omitempty"`
FSxConfig *FSxConfiguration `json:"fsx_config,omitempty" yaml:"fsx_config,omitempty"`
// Legacy fields for backward compatibility
FilesystemID string `json:"filesystem_id,omitempty" yaml:"filesystem_id,omitempty"`
VolumeID string `json:"volume_id,omitempty" yaml:"volume_id,omitempty"`
BucketName string `json:"bucket_name,omitempty" yaml:"bucket_name,omitempty"`
Region string `json:"region,omitempty" yaml:"region,omitempty"`
CreationTime time.Time `json:"creation_time,omitempty" yaml:"creation_time,omitempty"`
}
StorageInfo represents information about a created storage resource
type StorageManager ¶
type StorageManager struct {
// contains filtered or unexported fields
}
StorageManager is the main interface for Prism storage operations
func NewStorageManager ¶
func NewStorageManager(cfg aws.Config) *StorageManager
NewStorageManager creates a new storage manager with all storage backends
func (*StorageManager) AttachStorageToInstance ¶
func (m *StorageManager) AttachStorageToInstance(storageName string, storageType StorageType, instanceID string) error
AttachStorageToInstance attaches storage to an EC2 instance
func (*StorageManager) CreateMultiTierStorage ¶
func (m *StorageManager) CreateMultiTierStorage(name string, config MultiTierStorageConfig) (*MultiTierStorageInfo, error)
CreateMultiTierStorage creates a multi-tier storage setup for complex workloads
func (*StorageManager) CreateStorage ¶
func (m *StorageManager) CreateStorage(req StorageRequest) (*StorageInfo, error)
CreateStorage creates a storage resource of the specified type
func (*StorageManager) DeleteStorage ¶
func (m *StorageManager) DeleteStorage(name string, storageType StorageType) error
DeleteStorage deletes a storage resource by name and type
func (*StorageManager) DetachStorageFromInstance ¶
func (m *StorageManager) DetachStorageFromInstance(storageName string, storageType StorageType, instanceID string) error
DetachStorageFromInstance detaches storage from an EC2 instance
func (*StorageManager) GetInstallScript ¶
func (m *StorageManager) GetInstallScript(storageType StorageType, options ...interface{}) (string, error)
GetInstallScript generates installation scripts for storage mounting tools
func (*StorageManager) GetMountCommand ¶
func (m *StorageManager) GetMountCommand(name string, storageType StorageType, mountPoint string) (string, error)
GetMountCommand generates the appropriate mount command for a storage resource
func (*StorageManager) GetStorageAnalytics ¶
func (m *StorageManager) GetStorageAnalytics(period AnalyticsPeriod, resources []string) (*CostAnalysis, error)
GetStorageAnalytics retrieves comprehensive storage analytics
func (*StorageManager) GetStorageHealth ¶
func (m *StorageManager) GetStorageHealth() (*StorageHealthReport, error)
GetStorageHealth performs health checks across all storage types
func (*StorageManager) GetStorageRecommendations ¶
func (m *StorageManager) GetStorageRecommendations() ([]OptimizationRecommendation, error)
GetStorageRecommendations provides optimization recommendations for all storage
func (*StorageManager) GetUsagePatterns ¶
func (m *StorageManager) GetUsagePatterns(resources []string, days int) (*UsagePatternAnalysis, error)
GetUsagePatterns analyzes storage usage patterns for optimization
func (*StorageManager) ListStorage ¶
func (m *StorageManager) ListStorage() ([]StorageInfo, error)
ListStorage lists all storage resources across all types
func (*StorageManager) ListStorageByType ¶
func (m *StorageManager) ListStorageByType(storageType StorageType) ([]StorageInfo, error)
ListStorageByType lists storage resources of a specific type
func (*StorageManager) OptimizeStorageForWorkload ¶
func (m *StorageManager) OptimizeStorageForWorkload(name string, storageType StorageType, workload WorkloadType) error
OptimizeStorageForWorkload applies workload-specific optimizations
type StorageMetrics ¶
type StorageMetrics struct {
ResourceName string `json:"resource_name"`
ResourceType StorageType `json:"resource_type"`
TotalSize int64 `json:"total_size"`
AverageSize int64 `json:"average_size"`
ObjectCount int64 `json:"object_count"`
IOPS float64 `json:"iops"`
Throughput float64 `json:"throughput"`
PeakThroughput float64 `json:"peak_throughput"`
LastUpdated time.Time `json:"last_updated"`
}
type StoragePerformanceStats ¶
type StoragePerformanceStats struct {
// Throughput metrics
ReadThroughputMBps float64 `json:"read_throughput_mbps" yaml:"read_throughput_mbps"`
WriteThroughputMBps float64 `json:"write_throughput_mbps" yaml:"write_throughput_mbps"`
// IOPS metrics
ReadIOPS float64 `json:"read_iops" yaml:"read_iops"`
WriteIOPS float64 `json:"write_iops" yaml:"write_iops"`
// Latency metrics (milliseconds)
AverageReadLatency float64 `json:"average_read_latency" yaml:"average_read_latency"`
AverageWriteLatency float64 `json:"average_write_latency" yaml:"average_write_latency"`
P95ReadLatency float64 `json:"p95_read_latency" yaml:"p95_read_latency"`
P95WriteLatency float64 `json:"p95_write_latency" yaml:"p95_write_latency"`
// Queue depth and concurrency
AverageQueueDepth float64 `json:"average_queue_depth" yaml:"average_queue_depth"`
MaxConcurrentOps int32 `json:"max_concurrent_ops" yaml:"max_concurrent_ops"`
// Cache performance (for S3 mounts)
CacheHitRate float64 `json:"cache_hit_rate,omitempty" yaml:"cache_hit_rate,omitempty"`
CacheMissRate float64 `json:"cache_miss_rate,omitempty" yaml:"cache_miss_rate,omitempty"`
}
StoragePerformanceStats contains storage performance metrics
type StorageRequest ¶
type StorageRequest struct {
// Basic configuration
Name string `json:"name" yaml:"name"`
Type StorageType `json:"type" yaml:"type"`
Size int64 `json:"size,omitempty" yaml:"size,omitempty"` // Size in GB for applicable types
// Performance configuration
PerformanceMode string `json:"performance_mode,omitempty" yaml:"performance_mode,omitempty"`
ThroughputMode string `json:"throughput_mode,omitempty" yaml:"throughput_mode,omitempty"`
// Encryption
Encrypted bool `json:"encrypted,omitempty" yaml:"encrypted,omitempty"`
KMSKeyId string `json:"kms_key_id,omitempty" yaml:"kms_key_id,omitempty"`
// Tags and metadata
Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Type-specific configuration
FSxConfig *FSxConfiguration `json:"fsx_config,omitempty" yaml:"fsx_config,omitempty"`
S3Config *S3Configuration `json:"s3_config,omitempty" yaml:"s3_config,omitempty"`
EFSConfig *EFSConfiguration `json:"efs_config,omitempty" yaml:"efs_config,omitempty"`
EBSConfig *EBSConfiguration `json:"ebs_config,omitempty" yaml:"ebs_config,omitempty"`
}
StorageRequest represents a generic storage creation request
type StorageResource ¶
type StorageResource struct {
Name string `json:"name"`
Type StorageType `json:"type"`
ResourceID string `json:"resource_id"`
}
type StorageType ¶
type StorageType string
StorageType defines the type of storage system
const ( StorageTypeEFS StorageType = "efs" // Amazon EFS (existing) StorageTypeFSx StorageType = "fsx" // Amazon FSx StorageTypeS3 StorageType = "s3" // S3 mount points StorageTypeEBS StorageType = "ebs" // EBS volumes (existing) )
type StorageUsageStats ¶
type StorageUsageStats struct {
// Capacity usage
TotalCapacity int64 `json:"total_capacity" yaml:"total_capacity"` // bytes
UsedCapacity int64 `json:"used_capacity" yaml:"used_capacity"` // bytes
UsagePercent float64 `json:"usage_percent" yaml:"usage_percent"`
// File statistics
TotalFiles int64 `json:"total_files" yaml:"total_files"`
TotalDirectories int64 `json:"total_directories" yaml:"total_directories"`
// Growth statistics
DailyGrowthRate float64 `json:"daily_growth_rate" yaml:"daily_growth_rate"` // bytes per day
WeeklyGrowthRate float64 `json:"weekly_growth_rate" yaml:"weekly_growth_rate"` // bytes per week
MonthlyGrowthRate float64 `json:"monthly_growth_rate" yaml:"monthly_growth_rate"` // bytes per month
// Top consumers
TopDirectories []DirectoryUsage `json:"top_directories,omitempty" yaml:"top_directories,omitempty"`
TopFileTypes []FileTypeUsage `json:"top_file_types,omitempty" yaml:"top_file_types,omitempty"`
}
StorageUsageStats contains storage usage statistics
type TierInfo ¶
type TierInfo struct {
StorageType StorageType `json:"storage_type"`
Rationale string `json:"rationale"`
EstimatedCost CostEstimate `json:"estimated_cost"`
}
type TierRecommendation ¶
type TransferManager ¶ added in v0.5.7
type TransferManager struct {
// contains filtered or unexported fields
}
TransferManager manages S3 file transfers with progress tracking and resume capability
func NewTransferManager ¶ added in v0.5.7
func NewTransferManager(s3Client *s3.Client, options *TransferOptions) *TransferManager
NewTransferManager creates a new S3 transfer manager
func (*TransferManager) CancelTransfer ¶ added in v0.7.7
func (tm *TransferManager) CancelTransfer(transferID string) error
CancelTransfer cancels an in-progress transfer by its ID. It calls the stored cancel function which propagates cancellation to the underlying upload or download context. If the transfer does not exist or has already completed, this is a no-op (returns nil).
func (*TransferManager) DeleteObject ¶ added in v0.5.7
func (tm *TransferManager) DeleteObject(ctx context.Context, bucket, key string) error
DeleteObject deletes an object from S3
func (*TransferManager) DownloadFile ¶ added in v0.5.7
func (tm *TransferManager) DownloadFile(ctx context.Context, bucket, key, localPath string) (*TransferProgress, error)
DownloadFile downloads a file from S3 with progress tracking and resume support
func (*TransferManager) GetTransferProgress ¶ added in v0.5.7
func (tm *TransferManager) GetTransferProgress(transferID string) (*TransferProgress, bool)
GetTransferProgress retrieves a snapshot copy of the current progress of a transfer. A copy is returned so callers can safely read fields without holding the lock.
func (*TransferManager) ListTransfers ¶ added in v0.5.7
func (tm *TransferManager) ListTransfers() []*TransferProgress
ListTransfers returns snapshot copies of all active transfers. Copies are returned so callers can safely read fields without holding the lock.
func (*TransferManager) UploadFile ¶ added in v0.5.7
func (tm *TransferManager) UploadFile(ctx context.Context, localPath, bucket, key string) (*TransferProgress, error)
UploadFile uploads a file to S3 with multipart upload and progress tracking
type TransferOptions ¶ added in v0.5.7
type TransferOptions struct {
// PartSize is the chunk size for multipart transfers (defaults to DefaultPartSize)
PartSize int64
// Concurrency is the number of concurrent part uploads/downloads
Concurrency int
// Checksum enables MD5 checksum verification
Checksum bool
// AutoCleanup automatically deletes S3 object after successful download
AutoCleanup bool
// ResumeSupport enables saving checkpoints for resume capability
ResumeSupport bool
// CheckpointDir is where to save resume checkpoints
CheckpointDir string
// ProgressCallback is called periodically with transfer progress
ProgressCallback func(progress *TransferProgress)
// ProgressInterval is how often to call ProgressCallback
ProgressInterval time.Duration
}
TransferOptions configures a file transfer operation
func DefaultTransferOptions ¶ added in v0.5.7
func DefaultTransferOptions() *TransferOptions
DefaultTransferOptions returns sensible defaults for transfer operations
type TransferProgress ¶ added in v0.5.7
type TransferProgress struct {
// TransferID is the unique identifier for this transfer
TransferID string `json:"transfer_id"`
// Type is the transfer operation type (upload/download)
Type TransferType `json:"type"`
// Status is the current transfer status
Status TransferStatus `json:"status"`
// FilePath is the local file path
FilePath string `json:"file_path"`
// S3Bucket is the S3 bucket name
S3Bucket string `json:"s3_bucket"`
// S3Key is the S3 object key
S3Key string `json:"s3_key"`
// TotalBytes is the total file size in bytes
TotalBytes int64 `json:"total_bytes"`
// TransferredBytes is the number of bytes transferred so far
TransferredBytes int64 `json:"transferred_bytes"`
// PercentComplete is the completion percentage (0-100)
PercentComplete float64 `json:"percent_complete"`
// BytesPerSecond is the current transfer speed
BytesPerSecond int64 `json:"bytes_per_second"`
// StartTime is when the transfer started
StartTime time.Time `json:"start_time"`
// EstimatedCompletion is the estimated time to completion
EstimatedCompletion *time.Time `json:"estimated_completion,omitempty"`
// Error contains error message if transfer failed
Error string `json:"error,omitempty"`
// Checksum is the MD5 checksum of the file
Checksum string `json:"checksum,omitempty"`
// PartsCompleted is the number of multipart chunks completed
PartsCompleted int `json:"parts_completed"`
// TotalParts is the total number of multipart chunks
TotalParts int `json:"total_parts"`
// LastUpdate is the timestamp of the last progress update
LastUpdate time.Time `json:"last_update"`
}
TransferProgress tracks real-time progress of a file transfer
type TransferStatus ¶ added in v0.5.7
type TransferStatus string
TransferStatus represents the current status of a transfer
const ( // TransferStatusPending indicates transfer is queued but not started TransferStatusPending TransferStatus = "pending" // TransferStatusInProgress indicates transfer is actively running TransferStatusInProgress TransferStatus = "in_progress" // TransferStatusPaused indicates transfer was paused (supports resume) TransferStatusPaused TransferStatus = "paused" // TransferStatusCompleted indicates transfer finished successfully TransferStatusCompleted TransferStatus = "completed" // TransferStatusFailed indicates transfer failed with error TransferStatusFailed TransferStatus = "failed" // TransferStatusCancelled indicates transfer was cancelled by user TransferStatusCancelled TransferStatus = "cancelled" )
type TransferType ¶ added in v0.5.7
type TransferType string
TransferType represents the type of transfer operation
const ( // TransferTypeUpload represents an upload operation TransferTypeUpload TransferType = "upload" // TransferTypeDownload represents a download operation TransferTypeDownload TransferType = "download" )
type UsageAnalysis ¶
type UsageAnalysis struct {
TimeRange TimeRange `json:"time_range"`
Patterns []UsagePattern `json:"patterns"`
Recommendations []PatternRecommendation `json:"recommendations"`
LastUpdated time.Time `json:"last_updated"`
}
type UsageDataPoint ¶
type UsagePattern ¶
type UsagePatternAnalysis ¶
type UsagePatternAnalysis struct {
AnalysisPeriod string `json:"analysis_period"`
ResourcePatterns map[string]ResourceUsagePattern `json:"resource_patterns"`
PatternRecommendations []PatternRecommendation `json:"pattern_recommendations"`
}
Usage pattern analysis types
type UserAccessPattern ¶
type UserAccessPattern struct {
UserId string `json:"user_id" yaml:"user_id"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
ReadBytes int64 `json:"read_bytes" yaml:"read_bytes"`
WriteBytes int64 `json:"write_bytes" yaml:"write_bytes"`
Operations int64 `json:"operations" yaml:"operations"`
LastAccess time.Time `json:"last_access" yaml:"last_access"`
AccessPercent float64 `json:"access_percent" yaml:"access_percent"`
}
UserAccessPattern contains user access pattern information
type WindowsAuditLogConfiguration ¶
type WindowsAuditLogConfiguration struct {
FileAccessAuditLogLevel string `json:"file_access_audit_log_level" yaml:"file_access_audit_log_level"` // DISABLED, SUCCESS_ONLY, FAILURE_ONLY, SUCCESS_AND_FAILURE
AuditLogDestination string `json:"audit_log_destination,omitempty" yaml:"audit_log_destination,omitempty"` // CloudWatch log group
}
WindowsAuditLogConfiguration contains Windows audit logging settings
type WindowsConfiguration ¶
type WindowsConfiguration struct {
// Active Directory configuration
ActiveDirectoryId string `json:"active_directory_id,omitempty" yaml:"active_directory_id,omitempty"`
SelfManagedActiveDirectory *SelfManagedActiveDirectory `json:"self_managed_active_directory,omitempty" yaml:"self_managed_active_directory,omitempty"`
// Aliases
Aliases []string `json:"aliases,omitempty" yaml:"aliases,omitempty"`
// Audit log configuration
AuditLogConfiguration *WindowsAuditLogConfiguration `json:"audit_log_configuration,omitempty" yaml:"audit_log_configuration,omitempty"`
// Deployment type
DeploymentType string `json:"deployment_type,omitempty" yaml:"deployment_type,omitempty"` // MULTI_AZ_1, SINGLE_AZ_1, SINGLE_AZ_2
// Preferred subnet (for Multi-AZ)
PreferredSubnetId string `json:"preferred_subnet_id,omitempty" yaml:"preferred_subnet_id,omitempty"`
// Weekly maintenance
WeeklyMaintenanceStartTime string `json:"weekly_maintenance_start_time,omitempty" yaml:"weekly_maintenance_start_time,omitempty"`
}
WindowsConfiguration contains Windows File Server settings
type WorkloadType ¶
type WorkloadType string
WorkloadType defines general workload optimization types
const ( WorkloadTypeGeneral WorkloadType = "general" WorkloadTypeML WorkloadType = "ml" WorkloadTypeBigData WorkloadType = "bigdata" WorkloadTypeHPC WorkloadType = "hpc" WorkloadTypeArchival WorkloadType = "archival" )
type ZFSClientConfiguration ¶
type ZFSClientConfiguration struct {
Clients string `json:"clients" yaml:"clients"` // IP range or hostname
Options []string `json:"options" yaml:"options"` // NFS options
}
ZFSClientConfiguration defines NFS client settings
type ZFSConfiguration ¶
type ZFSConfiguration struct {
// Root volume configuration
RootVolumeConfiguration *ZFSRootVolumeConfiguration `json:"root_volume_configuration" yaml:"root_volume_configuration"`
// Deployment type
DeploymentType string `json:"deployment_type,omitempty" yaml:"deployment_type,omitempty"` // SINGLE_AZ_1, SINGLE_AZ_2
// Disk IOPS configuration
DiskIopsConfiguration *ZFSDiskIopsConfiguration `json:"disk_iops_configuration,omitempty" yaml:"disk_iops_configuration,omitempty"`
// Weekly maintenance start time
WeeklyMaintenanceStartTime string `json:"weekly_maintenance_start_time,omitempty" yaml:"weekly_maintenance_start_time,omitempty"`
}
ZFSConfiguration contains OpenZFS-specific settings
type ZFSDiskIopsConfiguration ¶
type ZFSDiskIopsConfiguration struct {
Iops int32 `json:"iops,omitempty" yaml:"iops,omitempty"`
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` // AUTOMATIC, USER_PROVISIONED
}
ZFSDiskIopsConfiguration defines disk IOPS settings
type ZFSInfo ¶
type ZFSInfo struct {
DeploymentType string `json:"deployment_type" yaml:"deployment_type"`
RootVolumeId string `json:"root_volume_id,omitempty" yaml:"root_volume_id,omitempty"`
Volumes []ZFSVolumeInfo `json:"volumes,omitempty" yaml:"volumes,omitempty"`
}
ZFSInfo contains OpenZFS filesystem information
type ZFSNfsExport ¶
type ZFSNfsExport struct {
ClientConfigurations []ZFSClientConfiguration `json:"client_configurations" yaml:"client_configurations"`
Path string `json:"path" yaml:"path"`
}
ZFSNfsExport defines NFS export configuration
type ZFSRootVolumeConfiguration ¶
type ZFSRootVolumeConfiguration struct {
// Data compression
DataCompression string `json:"data_compression,omitempty" yaml:"data_compression,omitempty"` // NONE, ZSTD, LZ4
// NFS exports
NfsExports []ZFSNfsExport `json:"nfs_exports,omitempty" yaml:"nfs_exports,omitempty"`
// User and group quotas
UserAndGroupQuotas []ZFSUserGroupQuota `json:"user_and_group_quotas,omitempty" yaml:"user_and_group_quotas,omitempty"`
// Copy tags to snapshots
CopyTagsToSnapshots bool `json:"copy_tags_to_snapshots,omitempty" yaml:"copy_tags_to_snapshots,omitempty"`
// Read only
ReadOnly bool `json:"read_only,omitempty" yaml:"read_only,omitempty"`
// Record size
RecordSizeKiB int32 `json:"record_size_kib,omitempty" yaml:"record_size_kib,omitempty"`
}
ZFSRootVolumeConfiguration contains ZFS root volume settings
type ZFSUserGroupQuota ¶
type ZFSUserGroupQuota struct {
Id int32 `json:"id" yaml:"id"` // User/Group ID
StorageCapacityQuotaGiB int32 `json:"storage_capacity_quota_gib" yaml:"storage_capacity_quota_gib"`
Type string `json:"type" yaml:"type"` // USER, GROUP
}
ZFSUserGroupQuota defines user/group quotas
type ZFSVolumeInfo ¶
type ZFSVolumeInfo struct {
VolumeId string `json:"volume_id" yaml:"volume_id"`
VolumePath string `json:"volume_path" yaml:"volume_path"`
StorageQuota int64 `json:"storage_quota,omitempty" yaml:"storage_quota,omitempty"`
}
ZFSVolumeInfo contains ZFS volume information