Documentation
¶
Index ¶
- Constants
- func WaitForVolume(ctx context.Context, api *instance.API, zone scw.Zone, id string, ...) (*instance.Volume, error)
- type BlockAndInstanceAPI
- func (api *BlockAndInstanceAPI) DeleteUnknownVolume(req *DeleteUnknownVolumeRequest, opts ...scw.RequestOption) error
- func (api *BlockAndInstanceAPI) GetUnknownSnapshot(req *GetUnknownSnapshotRequest, opts ...scw.RequestOption) (*UnknownSnapshot, error)
- func (api *BlockAndInstanceAPI) GetUnknownVolume(req *GetUnknownVolumeRequest, opts ...scw.RequestOption) (*UnknownVolume, error)
- func (api *BlockAndInstanceAPI) ResizeUnknownVolume(req *ResizeUnknownVolumeRequest, opts ...scw.RequestOption) error
- type DeleteUnknownVolumeRequest
- type GetUnknownSnapshotRequest
- type GetUnknownVolumeRequest
- type ResizeUnknownVolumeRequest
- type UnknownSnapshot
- type UnknownVolume
Constants ¶
View Source
const DefaultInstanceRetryInterval = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockAndInstanceAPI ¶
func InstanceAndBlockAPIWithZone ¶
func InstanceAndBlockAPIWithZone(d *schema.ResourceData, m interface{}) (*BlockAndInstanceAPI, scw.Zone, error)
InstanceAndBlockAPIWithZone returns a new instance API and the zone for a Create request
func InstanceAndBlockAPIWithZoneAndID ¶
func InstanceAndBlockAPIWithZoneAndID(m interface{}, zonedID string) (*BlockAndInstanceAPI, scw.Zone, string, error)
InstanceAndBlockAPIWithZoneAndID returns an instance API with zone and ID extracted from the state
func NewBlockAndInstanceAPI ¶
func NewBlockAndInstanceAPI(client *scw.Client) *BlockAndInstanceAPI
func (*BlockAndInstanceAPI) DeleteUnknownVolume ¶
func (api *BlockAndInstanceAPI) DeleteUnknownVolume(req *DeleteUnknownVolumeRequest, opts ...scw.RequestOption) error
func (*BlockAndInstanceAPI) GetUnknownSnapshot ¶
func (api *BlockAndInstanceAPI) GetUnknownSnapshot(req *GetUnknownSnapshotRequest, opts ...scw.RequestOption) (*UnknownSnapshot, error)
func (*BlockAndInstanceAPI) GetUnknownVolume ¶
func (api *BlockAndInstanceAPI) GetUnknownVolume(req *GetUnknownVolumeRequest, opts ...scw.RequestOption) (*UnknownVolume, error)
func (*BlockAndInstanceAPI) ResizeUnknownVolume ¶
func (api *BlockAndInstanceAPI) ResizeUnknownVolume(req *ResizeUnknownVolumeRequest, opts ...scw.RequestOption) error
type GetUnknownVolumeRequest ¶
type UnknownSnapshot ¶
type UnknownVolume ¶
type UnknownVolume struct { Zone scw.Zone ID string Name string Size *scw.Size ServerID *string Boot *bool // Iops is set for Block volume only, use IsBlockVolume // Can be nil if not available in the Block API. Iops *uint32 InstanceVolumeType instance.VolumeVolumeType }
func (*UnknownVolume) IsAttached ¶
func (volume *UnknownVolume) IsAttached() bool
IsAttached returns true if the volume is attached to a server
func (*UnknownVolume) IsBlockVolume ¶
func (volume *UnknownVolume) IsBlockVolume() bool
IsBlockVolume is true if volume is managed by block API
func (*UnknownVolume) IsLocal ¶
func (volume *UnknownVolume) IsLocal() bool
IsLocal returns true if the volume is a local volume
func (*UnknownVolume) VolumeTemplate ¶
func (volume *UnknownVolume) VolumeTemplate() *instance.VolumeServerTemplate
VolumeTemplate returns a template to be used for servers requests.
Click to show internal directories.
Click to hide internal directories.