Documentation ¶
Index ¶
- Variables
- func ByFunc(readStateFunc ReadStateFunc) wait.StateWaiter
- func UntilArchiveIsReady(ctx context.Context, client iaas.ArchiveAPI, zone string, id types.ID) (*iaas.Archive, error)
- func UntilDatabaseIsDown(ctx context.Context, client iaas.DatabaseAPI, zone string, id types.ID) (*iaas.Database, error)
- func UntilDatabaseIsUp(ctx context.Context, client iaas.DatabaseAPI, zone string, id types.ID) (*iaas.Database, error)
- func UntilDiskIsReady(ctx context.Context, client iaas.DiskAPI, zone string, id types.ID) (*iaas.Disk, error)
- func UntilInternetIsReady(ctx context.Context, client iaas.InternetAPI, zone string, id types.ID) (*iaas.Internet, error)
- func UntilLoadBalancerIsDown(ctx context.Context, client iaas.LoadBalancerAPI, zone string, id types.ID) (*iaas.LoadBalancer, error)
- func UntilLoadBalancerIsUp(ctx context.Context, client iaas.LoadBalancerAPI, zone string, id types.ID) (*iaas.LoadBalancer, error)
- func UntilMobileGatewayIsDown(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
- func UntilMobileGatewayIsReady(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
- func UntilMobileGatewayIsUp(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
- func UntilNFSIsDown(ctx context.Context, client iaas.NFSAPI, zone string, id types.ID) (*iaas.NFS, error)
- func UntilNFSIsUp(ctx context.Context, client iaas.NFSAPI, zone string, id types.ID) (*iaas.NFS, error)
- func UntilServerIsDown(ctx context.Context, client iaas.ServerAPI, zone string, id types.ID) (*iaas.Server, error)
- func UntilServerIsUp(ctx context.Context, client iaas.ServerAPI, zone string, id types.ID) (*iaas.Server, error)
- func UntilVPCRouterIsDown(ctx context.Context, client iaas.VPCRouterAPI, zone string, id types.ID) (*iaas.VPCRouter, error)
- func UntilVPCRouterIsReady(ctx context.Context, client iaas.VPCRouterAPI, zone string, id types.ID) (*iaas.VPCRouter, error)
- func UntilVPCRouterIsUp(ctx context.Context, client iaas.VPCRouterAPI, zone string, id types.ID) (*iaas.VPCRouter, error)
- type ReadStateFunc
- type SimpleStateWaiter
Constants ¶
This section is empty.
Variables ¶
var ( // ApplianceNotFoundRetryCount アプライアンスの待ち処理時に404エラーとなった場合のリトライ回数 ApplianceNotFoundRetryCount = 30 // InternetNotFoundRetryCount ルータの作成待ち処理時に404エラーとなった場合のリトライ回数 InternetNotFoundRetryCount = 360 )
Functions ¶
func ByFunc ¶
func ByFunc(readStateFunc ReadStateFunc) wait.StateWaiter
ByFunc デフォルトのパラメータでSimpleStateWaiterを作成して返す
func UntilArchiveIsReady ¶
func UntilArchiveIsReady(ctx context.Context, client iaas.ArchiveAPI, zone string, id types.ID) (*iaas.Archive, error)
UntilArchiveIsReady コピー完了まで待機
func UntilDatabaseIsDown ¶
func UntilDatabaseIsDown(ctx context.Context, client iaas.DatabaseAPI, zone string, id types.ID) (*iaas.Database, error)
UntilDatabaseIsDown シャットダウンまで待機
func UntilDatabaseIsUp ¶
func UntilDatabaseIsUp(ctx context.Context, client iaas.DatabaseAPI, zone string, id types.ID) (*iaas.Database, error)
UntilDatabaseIsUp 起動まで待機
func UntilDiskIsReady ¶
func UntilDiskIsReady(ctx context.Context, client iaas.DiskAPI, zone string, id types.ID) (*iaas.Disk, error)
UntilDiskIsReady コピー完了/ディスク修正完了まで待機
func UntilInternetIsReady ¶
func UntilInternetIsReady(ctx context.Context, client iaas.InternetAPI, zone string, id types.ID) (*iaas.Internet, error)
UntilInternetIsReady 準備完了まで待機
func UntilLoadBalancerIsDown ¶
func UntilLoadBalancerIsDown(ctx context.Context, client iaas.LoadBalancerAPI, zone string, id types.ID) (*iaas.LoadBalancer, error)
UntilLoadBalancerIsDown シャットダウンまで待機
func UntilLoadBalancerIsUp ¶
func UntilLoadBalancerIsUp(ctx context.Context, client iaas.LoadBalancerAPI, zone string, id types.ID) (*iaas.LoadBalancer, error)
UntilLoadBalancerIsUp 起動完了まで待機
func UntilMobileGatewayIsDown ¶
func UntilMobileGatewayIsDown(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
UntilMobileGatewayIsDown シャットダウンまで待機
func UntilMobileGatewayIsReady ¶
func UntilMobileGatewayIsReady(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
UntilMobileGatewayIsReady コピー完了まで待機
func UntilMobileGatewayIsUp ¶
func UntilMobileGatewayIsUp(ctx context.Context, client iaas.MobileGatewayAPI, zone string, id types.ID) (*iaas.MobileGateway, error)
UntilMobileGatewayIsUp 起動まで待機
func UntilNFSIsDown ¶
func UntilNFSIsDown(ctx context.Context, client iaas.NFSAPI, zone string, id types.ID) (*iaas.NFS, error)
UntilNFSIsDown シャットダウンまで待機
func UntilNFSIsUp ¶
func UntilNFSIsUp(ctx context.Context, client iaas.NFSAPI, zone string, id types.ID) (*iaas.NFS, error)
UntilNFSIsUp 起動まで待機
func UntilServerIsDown ¶
func UntilServerIsDown(ctx context.Context, client iaas.ServerAPI, zone string, id types.ID) (*iaas.Server, error)
UntilServerIsDown シャットダウンまで待機
func UntilServerIsUp ¶
func UntilServerIsUp(ctx context.Context, client iaas.ServerAPI, zone string, id types.ID) (*iaas.Server, error)
UntilServerIsUp 起動まで待機
func UntilVPCRouterIsDown ¶
func UntilVPCRouterIsDown(ctx context.Context, client iaas.VPCRouterAPI, zone string, id types.ID) (*iaas.VPCRouter, error)
UntilVPCRouterIsDown シャットダウンまで待機
Types ¶
type ReadStateFunc ¶
type SimpleStateWaiter ¶
type SimpleStateWaiter struct { // ReadStateFunc 待つべきかの判定func // trueかつerrorが空の場合は待ち処理を完了させる ReadStateFunc ReadStateFunc // Timeout タイムアウト Timeout time.Duration // PollingInterval ポーリング間隔 PollingInterval time.Duration }
SimpleStateWaiter シンプルな待ち処理のためのiaas.StateWaiterの実装
iaas.StatePollingWaiterをラップし、シンプルなfuncのみで待つべきかを判定する
func (*SimpleStateWaiter) WaitForState ¶
func (s *SimpleStateWaiter) WaitForState(ctx context.Context) (interface{}, error)
WaitForState iaas.StateWaiterの実装
func (*SimpleStateWaiter) WaitForStateAsync ¶
func (s *SimpleStateWaiter) WaitForStateAsync(ctx context.Context) (compCh <-chan interface{}, progressCh <-chan interface{}, errorCh <-chan error)
WaitForStateAsync iaas.StateWaiterの実装