Documentation
¶
Index ¶
- Constants
- func AddExtraFlags(fs *pflag.FlagSet)
- func BuildCreateBackupPayload(name, volID, snapshotID string, tags map[string]string) (iaas.CreateBackupPayload, error)
- func BuildUserAgent(component, componentVersion string) string
- func FilterBackups(backups []iaas.Backup, filters map[string]string) []iaas.Backup
- func FilterSnapshots(snapshots []iaas.Snapshot, filters map[string]string) []iaas.Snapshot
- func FilterVolumes(volumes []iaas.Volume, filters map[string]string) []iaas.Volume
- func GetConfig(reader io.Reader) (stackitconfig.CSIConfig, error)
- func GetConfigFromFile(path string) (stackitconfig.CSIConfig, error)
- func LabelsFromTags(tags map[string]string) map[string]any
- type Factory
- type IaaSClient
- type LabelMap
- type LoadBalancingClient
- type Option
- type Options
- type VolumeSourceTypes
Constants ¶
View Source
const ( VolumeAvailableStatus = "AVAILABLE" VolumeAttachedStatus = "ATTACHED" VolumeErrorStatus = "ERROR" VolumeDescription = "Created by STACKIT CSI driver" )
View Source
const ( BackupDescription = "Created by STACKIT CSI driver" BackupMaxDurationSecondsPerGBDefault = 20 BackupMaxDurationPerGB = "backup-max-duration-seconds-per-gb" )
View Source
const ( SnapshotReadyStatus = "AVAILABLE" SnapshotType = "type" )
Variables ¶
This section is empty.
Functions ¶
func AddExtraFlags ¶
func BuildUserAgent ¶
func FilterBackups ¶
func FilterSnapshots ¶
func FilterVolumes ¶
func GetConfigFromFile ¶
func GetConfigFromFile(path string) (stackitconfig.CSIConfig, error)
Types ¶
type Factory ¶
type Factory interface {
// LoadBalancing returns a STACKIT load balancing service client.
LoadBalancing(options []sdkconfig.ConfigurationOption) (LoadBalancingClient, error)
// IaaS returns a STACKIT IaaS service client.
IaaS(options []sdkconfig.ConfigurationOption) (IaaSClient, error)
}
Factory produces clients for various STACKIT services.
type IaaSClient ¶
type IaaSClient interface {
GetServer(ctx context.Context, serverID string) (*iaas.Server, error)
GetServerWithDetails(ctx context.Context, serverID string) (*iaas.Server, error)
ListServers(ctx context.Context) (*[]iaas.Server, error)
CreateSnapshot(ctx context.Context, payload iaas.CreateSnapshotPayload) (*iaas.Snapshot, error)
ListSnapshots(ctx context.Context, filters map[string]string) ([]iaas.Snapshot, string, error)
DeleteSnapshot(ctx context.Context, snapshotID string) error
GetSnapshot(ctx context.Context, snapshotID string) (*iaas.Snapshot, error)
WaitSnapshotReady(ctx context.Context, snapshotID string) (*string, error)
CreateBackup(ctx context.Context, name, volID, snapshotID string, tags map[string]string) (*iaas.Backup, error)
ListBackups(ctx context.Context, filters map[string]string) ([]iaas.Backup, error)
DeleteBackup(ctx context.Context, backupID string) error
GetBackup(ctx context.Context, backupID string) (*iaas.Backup, error)
WaitBackupReady(ctx context.Context, backupID string, snapshotSize int64, backupMaxDurationSecondsPerGB int) (*string, error)
CreateVolume(ctx context.Context, payload iaas.CreateVolumePayload) (*iaas.Volume, error)
DeleteVolume(ctx context.Context, volumeID string) error
AttachVolume(ctx context.Context, serverID, volumeID string, payload iaas.AddVolumeToServerPayload) (string, error)
DetachVolume(ctx context.Context, serverID, volumeID string) error
GetVolume(ctx context.Context, volumeID string) (*iaas.Volume, error)
GetVolumesByName(ctx context.Context, volName string) ([]iaas.Volume, error)
ListVolumes(ctx context.Context, _ int, _ string) ([]iaas.Volume, string, error)
ExpandVolume(ctx context.Context, volumeID, volumeStatus string, payload iaas.ResizeVolumePayload) error
WaitVolumeResized(ctx context.Context, volumeID string, sizeGB int64) error
WaitDiskAttached(ctx context.Context, instanceID, volumeID string) error
WaitDiskDetached(ctx context.Context, instanceID, volumeID string) error
WaitVolumeTargetStatusWithCustomBackoff(ctx context.Context, volumeID string, tStatus []string, backoff wait.Backoff) (*iaas.Volume, error)
ListRoutes(ctx context.Context, routingTableID string, labels LabelMap) ([]iaas.Route, error)
AddRoutes(ctx context.Context, routingTableID string, routes []iaas.Route) error
DeleteRoute(ctx context.Context, routingTableID string, routeID string) error
}
func NewIaaSClient ¶
func NewIaaSClient(region, projectID string, sdkOptions []sdkconfig.ConfigurationOption, clientOpts ...Option) (IaaSClient, error)
type LoadBalancingClient ¶
type LoadBalancingClient interface {
CreateLoadBalancer(ctx context.Context, payload *loadbalancer.CreateLoadBalancerPayload) (*loadbalancer.LoadBalancer, error)
GetLoadBalancer(ctx context.Context, id string) (*loadbalancer.LoadBalancer, error)
UpdateLoadBalancer(ctx context.Context, lbName string, updates *loadbalancer.UpdateLoadBalancerPayload) (*loadbalancer.LoadBalancer, error)
DeleteLoadBalancer(ctx context.Context, lbName string) error
UpdateTargetPool(ctx context.Context, name, targetPoolName string, payload loadbalancer.UpdateTargetPoolPayload) error
CreateCredentials(ctx context.Context, payload loadbalancer.CreateCredentialsPayload) (*loadbalancer.CreateCredentialsResponse, error)
ListCredentials(ctx context.Context) (*loadbalancer.ListCredentialsResponse, error)
UpdateCredentials(ctx context.Context, credentialsRef string, payload loadbalancer.UpdateCredentialsPayload) error
DeleteCredentials(ctx context.Context, credentialsRef string) error
}
func NewLoadBalancingClient ¶
func NewLoadBalancingClient(region, projectID string, options []sdkconfig.ConfigurationOption) (LoadBalancingClient, error)
type VolumeSourceTypes ¶
type VolumeSourceTypes string
const ( VolumeSource VolumeSourceTypes = "volume" SnapshotSource VolumeSourceTypes = "snapshot" BackupSource VolumeSourceTypes = "backup" )
Click to show internal directories.
Click to hide internal directories.