Documentation ¶
Index ¶
- Constants
- func GetTenantNames() (map[string]string, error)
- func GetTenants() ([]interface{}, error)
- func InitializeBucket(svc *service, location objectstorage.Location) error
- func RankDRF(t *resources.HostTemplate) float32
- func Register(name string, provider api.Provider)
- func SimilarityScore(ref string, s string) float64
- type ByRankDRF
- type Service
- type StorageServices
Constants ¶
const ( // CoreDRFWeight is the Dominant Resource Fairness weight of a core CoreDRFWeight float32 = 1.0 // RAMDRFWeight is the Dominant Resource Fairness weight of 1 GB of RAM RAMDRFWeight float32 = 1.0 / 8.0 // DiskDRFWeight is the Dominant Resource Fairness weight of 1 GB of Disk DiskDRFWeight float32 = 1.0 / 16.0 )
Variables ¶
This section is empty.
Functions ¶
func GetTenantNames ¶
GetTenantNames returns all known tenants names
func InitializeBucket ¶
func InitializeBucket(svc *service, location objectstorage.Location) error
InitializeBucket creates the Object Storage Container/Bucket that will store the metadata
func RankDRF ¶
func RankDRF(t *resources.HostTemplate) float32
RankDRF computes the Dominant Resource Fairness Rank of an host template
func Register ¶
Register a Client referenced by the provider name. Ex: "ovh", ovh.New() This function shoud be called by the init function of each provider to be registered in SafeScale
func SimilarityScore ¶
SimilarityScore computes a similariy score between 2 strings
Types ¶
type ByRankDRF ¶
type ByRankDRF []*resources.HostTemplate
ByRankDRF implements sort.Interface for []HostTemplate based on the Dominant Resource Fairness
type Service ¶
type Service interface { CreateHostWithKeyPair(resources.HostRequest) (*resources.Host, *userdata.Content, *resources.KeyPair, error) FilterImages(string) ([]resources.Image, error) GetMetadataKey() *crypt.Key GetMetadataBucket() objectstorage.Bucket ListHostsByName() (map[string]*resources.Host, error) SearchImage(string) (*resources.Image, error) SelectTemplatesBySize(resources.SizingRequirements, bool) ([]*resources.HostTemplate, error) SelectTemplateByName(string) (*resources.HostTemplate, error) WaitHostState(string, HostState.Enum, time.Duration) error WaitVolumeState(string, VolumeState.Enum, time.Duration) (*resources.Volume, error) // --- from interface iaas.Providers --- providers.Provider objectstorage.Location }
Service agglomerates Provider and ObjectStorage interfaces in a single interface completed with higher-level methods
func UseService ¶
UseService return the service referenced by the given name. If necessary, this function try to load service from configuration file
type StorageServices ¶
type StorageServices struct {
// contains filtered or unexported fields
}
StorageServices ...
func UseStorages ¶
func UseStorages(tenantNames []string) (*StorageServices, error)
UseStorages return the storageService build around storages referenced in tenantNames
func (*StorageServices) GetBuckets ¶
func (sts *StorageServices) GetBuckets() []objectstorage.Bucket
GetBuckets ...
func (*StorageServices) RegisterStorage ¶
func (sts *StorageServices) RegisterStorage(tenantName string) error
RegisterStorage ...
Directories ¶
Path | Synopsis |
---|---|
enums/VolumeSpeed
Package VolumeSpeed defines an enum to represents Volume type
|
Package VolumeSpeed defines an enum to represents Volume type |
enums/VolumeState
Package VolumeState defines an enum to represents Volume states life cycle
|
Package VolumeState defines an enum to represents Volume states life cycle |