cloud

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DRAOptionsDataRepositoryPath           = "DataRepositoryPath"
	DRAOptionsDataRepositorySubdirectories = "DataRepositorySubdirectories"
	DRAOptionsFileCachePath                = "FileCachePath"
	DRAOptionsNFSConfiguration             = "NFS"
	NFSConfigurationOptionsDnsIps          = "DnsIps"
	NFSConfigurationOptionsVersion         = "Version"
)

DRA configuration parameters

View Source
const (
	LustreConfigOptionsDeploymentType           = "DeploymentType"
	LustreConfigOptionsMetaDataConfiguration    = "MetadataConfiguration"
	LustreConfigOptionsPerUnitStorageThroughput = "PerUnitStorageThroughput"
)

Lustre configuration parameters

View Source
const (
	// DefaultVolumeSize represents the default size used
	// this is the minimum Amazon File Cache FC size
	DefaultVolumeSize = 1200

	DefaultFileSystemType          = "LUSTRE"
	DefaultFileSystemTypeVersion   = "2.12"
	DefaultFileCacheDeploymentType = "CACHE_1"

	DefaultMetadataStorageCapacity  = 2400
	DefaultPerUnitStorageThroughput = 1000

	// PollCheckInterval specifies the interval to check if file cache is ready;
	// needs to be shorter than the provisioner timeout
	PollCheckInterval = 30 * time.Second
	// PollCheckTimeout specifies the time limit for polling DescribeFileCaches
	// for a completed create/update operation.
	PollCheckTimeout = 15 * time.Minute
)

Default values

View Source
const (
	// VolumeNameTagKey is the key value that refers to the volume's name.
	VolumeNameTagKey = "CSIVolumeName"
)

Tags

Variables

View Source
var (
	// ErrMultiFileCaches is an error that is returned when multiple
	// file caches are found with the same volume name.
	ErrMultiFileCaches = errors.New("Multiple filecaches with same ID")

	// ErrFcExistsDiffSize is an error that is returned if a file cache
	// exists with a given ID, but a different capacity is requested.
	ErrFcExistsDiffSize = errors.New("There is already a disk with same ID and different size")

	// ErrNotFound is returned when a resource is not found.
	ErrNotFound = errors.New("Resource was not found")
)

Functions

This section is empty.

Types

type Cloud

type Cloud interface {
	CreateFileCache(ctx context.Context, volumeName string, FileCacheOptions *FileCacheOptions) (fs *FileCache, err error)
	DeleteFileCache(ctx context.Context, FileCacheId string) (err error)
	DescribeFileCache(ctx context.Context, FileCacheId string) (fs *FileCache, err error)
	WaitForFileCacheAvailable(ctx context.Context, FileCacheId string) error
}

func NewCloud

func NewCloud(region string) Cloud

NewCloud returns a new instance of AWS cloud It panics if session is invalid

type EC2Metadata

type EC2Metadata interface {
	Available() bool
	GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error)
}

type FileCache

type FileCache struct {
	FileCacheId          string
	CapacityGiB          int64
	DnsName              string
	MountName            string
	FileCacheType        string
	FileCacheTypeVersion string
	// contains filtered or unexported fields
}

FileCache this is mainly for ValidateVolumeCapabilities

type FileCacheOptions

type FileCacheOptions struct {
	CapacityGiB                          int64
	SubnetId                             string
	SecurityGroupIds                     []string
	DataRepositoryAssociations           string
	FileCacheType                        string
	FileCacheTypeVersion                 string
	KmsKeyId                             string
	CopyTagsToDataRepositoryAssociations bool
	LustreConfiguration                  []string
	WeeklyMaintenanceStartTime           string
	ExtraTags                            []string
}

type MetadataService

type MetadataService interface {
	GetInstanceID() string
	GetRegion() string
	GetAvailabilityZone() string
}

MetadataService represents AWS metadata service.

func NewMetadata

func NewMetadata() (MetadataService, error)

NewMetadataService returns a new MetadataServiceImplementation.

func NewMetadataService

func NewMetadataService(svc EC2Metadata) (MetadataService, error)

NewMetadataService returns a new MetadataServiceImplementation.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL