Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultVolumeSize represents the default volume size. DefaultVolumeSize int64 = 1 * util.GiB )
Defaults
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskOptions ¶
DiskOptions represents parameters to create a state's volume
type Metadata ¶
type Metadata struct {
InstanceID string
Region string
AvailabilityZone string
Vnet string
Subnet string
CloudProvider string
ProviderScope string
}
func (*Metadata) GetAvailabilityZone ¶
GetAvailabilityZone returns the Availability Zone which the instance is in.
func (*Metadata) GetCloudProvider ¶
GetCloudProvider returns node's provider
func (*Metadata) GetInstanceID ¶
GetInstanceID returns the instance identification.
func (*Metadata) GetProviderScope ¶
GetProviderScope returns an aws account id or azure subscription id
type MetadataService ¶
type MetadataService interface {
GetInstanceID() string
GetRegion() string
GetAvailabilityZone() string
GetVnet() string
GetSubnet() string
GetCloudProvider() string
GetProviderScope() string
}
MetadataService represents multi-cloud metadata service.
func NewMetadata ¶
func NewMetadata() (MetadataService, error)
func NewMetadataService ¶
func NewMetadataService(clientset kubernetes.Interface) (MetadataService, error)
NewMetadataService returns a new MetadataServiceImplementation.
type StateHub ¶
type StateHub interface {
CreateVolume(ctx context.Context, volumeOptions *statehubAPI.CreateVolumeDto, state string) (*statehubAPI.Volume, error)
DeleteDisk(ctx context.Context, volumeName string) (success bool, err error)
ResizeDisk(ctx context.Context, volumeName string, reqSize int32) (newSize int32, err error)
GetVolumeByName(ctx context.Context, state string, volumeName string) (*statehubAPI.Volume, error)
}
func NewStatehub ¶
Click to show internal directories.
Click to hide internal directories.