Documentation
¶
Index ¶
- type BucketHandler
- type CPUInfo
- type ClusterHandler
- type FeatureHandler
- type HostHandler
- type ImageHandler
- type LabelHandler
- type NetworkHandler
- type PriceInfo
- type SSHHandler
- type SecurityGroupHandler
- type ShareHandler
- type StoredCPUInfo
- type SubnetHandler
- type TemplateHandler
- type TenantHandler
- type VolumeHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketHandler ¶
type BucketHandler interface {
List(bool) ([]string, fail.Error)
Create(string) fail.Error
Delete(string) fail.Error
Inspect(string) (resources.Bucket, fail.Error)
Download(string) ([]byte, fail.Error)
Clear(string) fail.Error
Upload(string, string) fail.Error
Mount(string, string, string) fail.Error
Unmount(string, string) fail.Error
}
BucketHandler defines interface to manipulate buckets
func NewBucketHandler ¶
func NewBucketHandler(job backend.Job) BucketHandler
NewBucketHandler creates a BucketHandler
type CPUInfo ¶
type CPUInfo struct {
TenantName string `json:"tenant_name,omitempty"`
TemplateID string `json:"template_id,omitempty"`
TemplateName string `json:"template_name,omitempty"`
ImageID string `json:"image_id,omitempty"`
ImageName string `json:"image_name,omitempty"`
LastUpdated string `json:"last_updated,omitempty"`
NumberOfCPU int `json:"number_of_cpu,omitempty"`
NumberOfCore int `json:"number_of_core,omitempty"`
NumberOfSocket int `json:"number_of_socket,omitempty"`
CPUFrequency float64 `json:"cpu_frequency_Ghz,omitempty"`
CPUArch string `json:"cpu_arch,omitempty"`
Hypervisor string `json:"hypervisor,omitempty"`
CPUModel string `json:"cpu_model,omitempty"`
RAMSize float64 `json:"ram_size_Gb,omitempty"`
RAMFreq float64 `json:"ram_freq,omitempty"`
GPU int `json:"gpu,omitempty"`
GPUModel string `json:"gpu_model,omitempty"`
DiskSize int64 `json:"disk_size_Gb,omitempty"`
MainDiskType string `json:"main_disk_type"`
MainDiskSpeed float64 `json:"main_disk_speed_MBps"`
SampleNetSpeed float64 `json:"sample_net_speed_KBps"`
EphDiskSize int64 `json:"eph_disk_size_Gb"`
Prices []PriceInfo `json:"prices,omitempty"`
}
CPUInfo stores CPU properties
type ClusterHandler ¶
type ClusterHandler interface {
List() ([]abstract.ClusterIdentity, fail.Error)
Create(abstract.ClusterRequest) (resources.Cluster, fail.Error)
State(string) (clusterstate.Enum, fail.Error)
Inspect(string) (resources.Cluster, fail.Error)
Start(string) fail.Error
Stop(string) fail.Error
Delete(string, bool) fail.Error
Expand(string, abstract.HostSizingRequirements, uint, data.Map, bool) ([]resources.Host, fail.Error)
Shrink(string, uint) ([]*propertiesv3.ClusterNode, fail.Error)
ListNodes(string) (resources.IndexedListOfClusterNodes, fail.Error)
InspectNode(string, string) (resources.Host, fail.Error)
DeleteNode(string, string) fail.Error
StopNode(string, string) fail.Error
StartNode(string, string) fail.Error
StateNode(string, string) (hoststate.Enum, fail.Error)
ListMasters(string) (resources.IndexedListOfClusterNodes, fail.Error)
FindAvailableMaster(string) (resources.Host, fail.Error)
InspectMaster(string, string) (resources.Host, fail.Error)
StopMaster(string, string) fail.Error
StartMaster(string, string) fail.Error
StateMaster(string, string) (hoststate.Enum, fail.Error)
}
ClusterHandler defines interface to manipulate buckets
func NewClusterHandler ¶
func NewClusterHandler(job backend.Job) ClusterHandler
NewClusterHandler creates a ClusterHandler
type FeatureHandler ¶
type FeatureHandler interface {
Add(featuretargettype.Enum, string, string, data.Map, resources.FeatureSettings) fail.Error
Check(featuretargettype.Enum, string, string, data.Map, resources.FeatureSettings) fail.Error
List(featuretargettype.Enum, string, bool) ([]resources.Feature, fail.Error)
Remove(featuretargettype.Enum, string, string, data.Map, resources.FeatureSettings) fail.Error
}
FeatureHandler interface defines the methods available to handle Features
func NewFeatureHandler ¶
func NewFeatureHandler(job backend.Job) FeatureHandler
type HostHandler ¶
type HostHandler interface {
BindSecurityGroup(string, string, resources.SecurityGroupActivation) fail.Error
Create(abstract.HostRequest, abstract.HostSizingRequirements) (resources.Host, fail.Error)
Delete(string) fail.Error
DisableSecurityGroup(string, string) fail.Error
EnableSecurityGroup(string, string) fail.Error
Inspect(string) (resources.Host, fail.Error)
List(bool) (abstract.HostList, fail.Error)
ListSecurityGroups(string) ([]*propertiesv1.SecurityGroupBond, fail.Error)
Reboot(string) fail.Error
Start(string) fail.Error
Status(string) (hoststate.Enum, fail.Error)
Stop(string) fail.Error
UnbindSecurityGroup(string, string) fail.Error
BindLabel(hostRef, labelRef, value string) fail.Error
InspectLabel(hostRef, labelRef string) (resources.Label, string, fail.Error)
ListLabels(hostRef string, kind string) ([]*protocol.LabelInspectResponse, fail.Error)
ResetLabel(hostRef, labelRef string) fail.Error
UnbindLabel(hostRef, labelRef string) fail.Error
UpdateLabel(hostRef, labelRef, value string) fail.Error
}
HostHandler ...
func NewHostHandler ¶
func NewHostHandler(job backend.Job) HostHandler
NewHostHandler is the constructor for HostHandler
type ImageHandler ¶
type ImageHandler interface {
List(all bool) ([]*abstract.Image, fail.Error)
Select(osfilter string) (*abstract.Image, fail.Error)
Filter(osfilter string) ([]abstract.Image, fail.Error)
}
ImageHandler defines API to manipulate images
func NewImageHandler ¶
func NewImageHandler(job backend.Job) ImageHandler
NewImageHandler creates a host service
type LabelHandler ¶
type LabelHandler interface {
Delete(ref string) fail.Error
List(listTag bool) ([]resources.Label, fail.Error)
Inspect(ref string) (resources.Label, fail.Error)
Create(name string, hasDefault bool, defaultValue string) (resources.Label, fail.Error)
}
LabelHandler defines API to manipulate tags
func NewTagHandler ¶
func NewTagHandler(job backend.Job) LabelHandler
NewTagHandler creates a Label service
type NetworkHandler ¶
type NetworkHandler interface {
Create(networkReq abstract.NetworkRequest, subnetReq *abstract.SubnetRequest, gwName string, gwSizing *abstract.HostSizingRequirements) (resources.Network, fail.Error)
Delete(networkRef string, force bool) fail.Error
Inspect(networkRef string) (resources.Network, fail.Error)
List(all bool) ([]*abstract.Network, fail.Error)
}
NetworkHandler exposes Network handling methods
func NewNetworkHandler ¶
func NewNetworkHandler(job backend.Job) NetworkHandler
NewNetworkHandler returns an instance of *networkHandler that satisfies interface NetworkHandler
type PriceInfo ¶
type PriceInfo struct {
Currency string `json:"currency"` // contains the currency of the price info
DurationLabel string `json:"duration_label,omitempty"` // contains a label for the duration "Per Hour" for example
Duration uint `json:"duration"` // number of seconds of the duration
Price float64 `json:"price"` // price in the given currency for the duration
}
PriceInfo stores price information
type SSHHandler ¶
type SSHHandler interface {
Run(hostname, cmd string) (int, string, string, fail.Error)
Copy(from string, to string) (int, string, string, fail.Error)
GetConfig(stacks.HostParameter) (api.Connector, fail.Error)
}
SSHHandler defines ssh management API
type SecurityGroupHandler ¶
type SecurityGroupHandler interface {
AddRule(sgRef string, rule *abstract.SecurityGroupRule) (resources.SecurityGroup, fail.Error)
Bonds(sgRef string, kind string) ([]*propertiesv1.SecurityGroupBond, []*propertiesv1.SecurityGroupBond, fail.Error)
Clear(sgRef string) fail.Error
Create(networkRef string, sgName string, description string, rules abstract.SecurityGroupRules) (resources.SecurityGroup, fail.Error)
Delete(sgRef string, force bool) fail.Error
DeleteRule(sgRef string, rule *abstract.SecurityGroupRule) (resources.SecurityGroup, fail.Error)
Inspect(sgRef string) (resources.SecurityGroup, fail.Error)
List(all bool) ([]*abstract.SecurityGroup, fail.Error)
Reset(sgRef string) fail.Error
}
SecurityGroupHandler exposes interface of handler of Security Group requests
func NewSecurityGroupHandler ¶
func NewSecurityGroupHandler(job backend.Job) SecurityGroupHandler
NewSecurityGroupHandler returns an instance of SecurityGroupHandler
type ShareHandler ¶
type ShareHandler interface {
}
ShareHandler defines API to manipulate Shares
func NewShareHandler ¶
func NewShareHandler(job backend.Job) ShareHandler
NewShareHandler creates a ShareHandler
type SubnetHandler ¶
type SubnetHandler interface {
BindSecurityGroup(networkRef string, subnetRef string, sgRef string, enable resources.SecurityGroupActivation) fail.Error
Create(networkRef string, req abstract.SubnetRequest, gwName string, sizing abstract.HostSizingRequirements) (resources.Subnet, fail.Error)
Delete(networkRef string, subnetRef string, force bool) fail.Error
DisableSecurityGroup(networkRef string, subnetRef string, sgRef string) fail.Error
EnableSecurityGroup(networkRef string, subnetRef string, sgRef string) fail.Error
Inspect(networkRef string, subnetRef string) (resources.Subnet, fail.Error)
List(networkRef string, all bool) ([]*abstract.Subnet, fail.Error)
ListSecurityGroups(networkRef string, subnetRef string, state securitygroupstate.Enum) ([]*propertiesv1.SecurityGroupBond, fail.Error)
UnbindSecurityGroup(networkRef, subnetRef, sgRef string) fail.Error
}
func NewSubnetHandler ¶
func NewSubnetHandler(job backend.Job) SubnetHandler
type TemplateHandler ¶
type TemplateHandler interface {
Inspect(string) (*abstract.HostTemplate, fail.Error)
List(bool) ([]*abstract.HostTemplate, fail.Error)
Match(abstract.HostSizingRequirements) ([]*abstract.HostTemplate, fail.Error)
}
TemplateHandler defines API to manipulate images
func NewTemplateHandler ¶
func NewTemplateHandler(job backend.Job) TemplateHandler
NewTemplateHandler creates a host service
type TenantHandler ¶
type TenantHandler interface {
Scan(string, bool, []string) (*protocol.ScanResultList, fail.Error)
Inspect(string) (*protocol.TenantInspectResponse, fail.Error)
SetCurrentTenant(context.Context, string) fail.Error
}
TenantHandler defines API to manipulate tenants
func NewTenantHandler ¶
func NewTenantHandler(job backend.Job) TenantHandler
NewTenantHandler creates a scanner service
type VolumeHandler ¶
type VolumeHandler interface {
Attach(volume string, host string, path string, format string, doNotFormat bool, doNotMount bool) fail.Error
Create(name string, size int, speed volumespeed.Enum) (resources.Volume, fail.Error)
Detach(volume string, host string) fail.Error
Delete(ref string) fail.Error
Inspect(ref string) (resources.Volume, fail.Error)
List(all bool) ([]resources.Volume, fail.Error)
}
VolumeHandler defines API to manipulate hosts
func NewVolumeHandler ¶
func NewVolumeHandler(job backend.Job) VolumeHandler
NewVolumeHandler creates a Volume service