wait

package
v2.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ApplianceNotFoundRetryCount アプライアンスの待ち処理時に404エラーとなった場合のリトライ回数
	ApplianceNotFoundRetryCount = 30
	// InternetNotFoundRetryCount ルータの作成待ち処理時に404エラーとなった場合のリトライ回数
	InternetNotFoundRetryCount = 360
)

Functions

func ByFunc added in v2.26.0

func ByFunc(readStateFunc ReadStateFunc) sacloud.StateWaiter

ByFunc デフォルトのパラメータでSimpleStateWaiterを作成して返す

func UntilArchiveIsReady

func UntilArchiveIsReady(ctx context.Context, client sacloud.ArchiveAPI, zone string, id types.ID) (*sacloud.Archive, error)

UntilArchiveIsReady コピー完了まで待機

func UntilDatabaseIsDown

func UntilDatabaseIsDown(ctx context.Context, client sacloud.DatabaseAPI, zone string, id types.ID) (*sacloud.Database, error)

UntilDatabaseIsDown シャットダウンまで待機

func UntilDatabaseIsUp

func UntilDatabaseIsUp(ctx context.Context, client sacloud.DatabaseAPI, zone string, id types.ID) (*sacloud.Database, error)

UntilDatabaseIsUp 起動まで待機

func UntilDiskIsReady

func UntilDiskIsReady(ctx context.Context, client sacloud.DiskAPI, zone string, id types.ID) (*sacloud.Disk, error)

UntilDiskIsReady コピー完了/ディスク修正完了まで待機

func UntilInternetIsReady

func UntilInternetIsReady(ctx context.Context, client sacloud.InternetAPI, zone string, id types.ID) (*sacloud.Internet, error)

UntilInternetIsReady 準備完了まで待機

func UntilLoadBalancerIsDown

func UntilLoadBalancerIsDown(ctx context.Context, client sacloud.LoadBalancerAPI, zone string, id types.ID) (*sacloud.LoadBalancer, error)

UntilLoadBalancerIsDown シャットダウンまで待機

func UntilLoadBalancerIsUp

func UntilLoadBalancerIsUp(ctx context.Context, client sacloud.LoadBalancerAPI, zone string, id types.ID) (*sacloud.LoadBalancer, error)

UntilLoadBalancerIsUp 起動完了まで待機

func UntilMobileGatewayIsDown

func UntilMobileGatewayIsDown(ctx context.Context, client sacloud.MobileGatewayAPI, zone string, id types.ID) (*sacloud.MobileGateway, error)

UntilMobileGatewayIsDown シャットダウンまで待機

func UntilMobileGatewayIsReady

func UntilMobileGatewayIsReady(ctx context.Context, client sacloud.MobileGatewayAPI, zone string, id types.ID) (*sacloud.MobileGateway, error)

UntilMobileGatewayIsReady コピー完了まで待機

func UntilMobileGatewayIsUp

func UntilMobileGatewayIsUp(ctx context.Context, client sacloud.MobileGatewayAPI, zone string, id types.ID) (*sacloud.MobileGateway, error)

UntilMobileGatewayIsUp 起動まで待機

func UntilNFSIsDown

func UntilNFSIsDown(ctx context.Context, client sacloud.NFSAPI, zone string, id types.ID) (*sacloud.NFS, error)

UntilNFSIsDown シャットダウンまで待機

func UntilNFSIsUp

func UntilNFSIsUp(ctx context.Context, client sacloud.NFSAPI, zone string, id types.ID) (*sacloud.NFS, error)

UntilNFSIsUp 起動まで待機

func UntilServerIsDown

func UntilServerIsDown(ctx context.Context, client sacloud.ServerAPI, zone string, id types.ID) (*sacloud.Server, error)

UntilServerIsDown シャットダウンまで待機

func UntilServerIsUp

func UntilServerIsUp(ctx context.Context, client sacloud.ServerAPI, zone string, id types.ID) (*sacloud.Server, error)

UntilServerIsUp 起動まで待機

func UntilVPCRouterIsDown

func UntilVPCRouterIsDown(ctx context.Context, client sacloud.VPCRouterAPI, zone string, id types.ID) (*sacloud.VPCRouter, error)

UntilVPCRouterIsDown シャットダウンまで待機

func UntilVPCRouterIsReady

func UntilVPCRouterIsReady(ctx context.Context, client sacloud.VPCRouterAPI, zone string, id types.ID) (*sacloud.VPCRouter, error)

UntilVPCRouterIsReady コピー完了まで待機

func UntilVPCRouterIsUp

func UntilVPCRouterIsUp(ctx context.Context, client sacloud.VPCRouterAPI, zone string, id types.ID) (*sacloud.VPCRouter, error)

UntilVPCRouterIsUp 起動まで待機

Types

type ReadStateFunc added in v2.26.0

type ReadStateFunc func() (bool, error)

type SimpleStateWaiter added in v2.26.0

type SimpleStateWaiter struct {
	// ReadStateFunc 待つべきかの判定func
	// trueかつerrorが空の場合は待ち処理を完了させる
	ReadStateFunc ReadStateFunc

	// Timeout タイムアウト
	Timeout time.Duration

	// PollingInterval ポーリング間隔
	PollingInterval time.Duration
}

SimpleStateWaiter シンプルな待ち処理のためのsacloud.StateWaiterの実装

sacloud.StatePollingWaiterをラップし、シンプルなfuncのみで待つべきかを判定する

func (*SimpleStateWaiter) AsyncWaitForState added in v2.26.0

func (s *SimpleStateWaiter) AsyncWaitForState(ctx context.Context) (compCh <-chan interface{}, progressCh <-chan interface{}, errorCh <-chan error)

AsyncWaitForState sacloud.StateWaiterの実装

func (*SimpleStateWaiter) SetPollingInterval added in v2.26.0

func (s *SimpleStateWaiter) SetPollingInterval(d time.Duration)

SetPollingInterval sacloud.StateWaiterの実装

func (*SimpleStateWaiter) SetPollingTimeout added in v2.26.0

func (s *SimpleStateWaiter) SetPollingTimeout(d time.Duration)

SetPollingTimeout sacloud.StateWaiterの実装

func (*SimpleStateWaiter) WaitForState added in v2.26.0

func (s *SimpleStateWaiter) WaitForState(ctx context.Context) (interface{}, error)

WaitForState sacloud.StateWaiterの実装

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL