當前位置: 首頁>>代碼示例>>Golang>>正文


Golang waiter.Waiter類代碼示例

本文整理匯總了Golang中github.com/bluet-deps/aws-sdk-go/private/waiter.Waiter的典型用法代碼示例。如果您正苦於以下問題:Golang Waiter類的具體用法?Golang Waiter怎麽用?Golang Waiter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Waiter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: WaitUntilReplicationGroupDeleted

func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeReplicationGroups",
		Delay:       15,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "ReplicationGroups[].Status",
				Expected: "deleted",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "ReplicationGroups[].Status",
				Expected: "available",
			},
			{
				State:    "success",
				Matcher:  "error",
				Argument: "",
				Expected: "ReplicationGroupNotFoundFault",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例2: WaitUntilStackCreateComplete

func (c *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeStacks",
		Delay:       30,
		MaxAttempts: 50,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "Stacks[].StackStatus",
				Expected: "CREATE_COMPLETE",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "Stacks[].StackStatus",
				Expected: "CREATE_FAILED",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例3: WaitUntilBucketExists

func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
	waiterCfg := waiter.Config{
		Operation:   "HeadBucket",
		Delay:       5,
		MaxAttempts: 20,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 200,
			},
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 403,
			},
			{
				State:    "retry",
				Matcher:  "status",
				Argument: "",
				Expected: 404,
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例4: WaitUntilKeyPairExists

func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeKeyPairs",
		Delay:       5,
		MaxAttempts: 6,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "length(KeyPairs[].KeyName) > `0`",
				Expected: true,
			},
			{
				State:    "retry",
				Matcher:  "error",
				Argument: "",
				Expected: "InvalidKeyPairNotFound",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例5: WaitUntilInstanceTerminated

func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeInstances",
		Delay:       15,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "Reservations[].Instances[].State.Name",
				Expected: "terminated",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "Reservations[].Instances[].State.Name",
				Expected: "pending",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "Reservations[].Instances[].State.Name",
				Expected: "stopping",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例6: WaitUntilNetworkInterfaceAvailable

func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeNetworkInterfaces",
		Delay:       20,
		MaxAttempts: 10,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "NetworkInterfaces[].Status",
				Expected: "available",
			},
			{
				State:    "failure",
				Matcher:  "error",
				Argument: "",
				Expected: "InvalidNetworkInterfaceIDNotFound",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例7: WaitUntilInstanceExists

func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeInstances",
		Delay:       5,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 200,
			},
			{
				State:    "retry",
				Matcher:  "error",
				Argument: "",
				Expected: "InvalidInstanceIDNotFound",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例8: WaitUntilClusterAvailable

func (c *Redshift) WaitUntilClusterAvailable(input *DescribeClustersInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeClusters",
		Delay:       60,
		MaxAttempts: 30,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "Clusters[].ClusterStatus",
				Expected: "available",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "Clusters[].ClusterStatus",
				Expected: "deleting",
			},
			{
				State:    "retry",
				Matcher:  "error",
				Argument: "",
				Expected: "ClusterNotFound",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例9: WaitUntilInstanceProfileExists

func (c *IAM) WaitUntilInstanceProfileExists(input *GetInstanceProfileInput) error {
	waiterCfg := waiter.Config{
		Operation:   "GetInstanceProfile",
		Delay:       1,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 200,
			},
			{
				State:    "retry",
				Matcher:  "status",
				Argument: "",
				Expected: 404,
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例10: WaitUntilJobComplete

func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error {
	waiterCfg := waiter.Config{
		Operation:   "ReadJob",
		Delay:       30,
		MaxAttempts: 120,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "path",
				Argument: "Job.Status",
				Expected: "Complete",
			},
			{
				State:    "failure",
				Matcher:  "path",
				Argument: "Job.Status",
				Expected: "Canceled",
			},
			{
				State:    "failure",
				Matcher:  "path",
				Argument: "Job.Status",
				Expected: "Error",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例11: WaitUntilServicesInactive

func (c *ECS) WaitUntilServicesInactive(input *DescribeServicesInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeServices",
		Delay:       15,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "failures[].reason",
				Expected: "MISSING",
			},
			{
				State:    "success",
				Matcher:  "pathAny",
				Argument: "services[].status",
				Expected: "INACTIVE",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例12: WaitUntilUserExists

func (c *IAM) WaitUntilUserExists(input *GetUserInput) error {
	waiterCfg := waiter.Config{
		Operation:   "GetUser",
		Delay:       1,
		MaxAttempts: 20,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 200,
			},
			{
				State:    "retry",
				Matcher:  "error",
				Argument: "",
				Expected: "NoSuchEntity",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例13: WaitUntilAppExists

func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeApps",
		Delay:       1,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "status",
				Argument: "",
				Expected: 200,
			},
			{
				State:    "failure",
				Matcher:  "status",
				Argument: "",
				Expected: 400,
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:28,代碼來源:waiters.go

示例14: WaitUntilTasksRunning

func (c *ECS) WaitUntilTasksRunning(input *DescribeTasksInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeTasks",
		Delay:       6,
		MaxAttempts: 100,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "tasks[].lastStatus",
				Expected: "STOPPED",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "failures[].reason",
				Expected: "MISSING",
			},
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "tasks[].lastStatus",
				Expected: "RUNNING",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go

示例15: WaitUntilCustomerGatewayAvailable

func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
	waiterCfg := waiter.Config{
		Operation:   "DescribeCustomerGateways",
		Delay:       15,
		MaxAttempts: 40,
		Acceptors: []waiter.WaitAcceptor{
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "CustomerGateways[].State",
				Expected: "available",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "CustomerGateways[].State",
				Expected: "deleted",
			},
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "CustomerGateways[].State",
				Expected: "deleting",
			},
		},
	}

	w := waiter.Waiter{
		Client: c,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
開發者ID:bluet-deps,項目名稱:aws-sdk-go,代碼行數:34,代碼來源:waiters.go


注:本文中的github.com/bluet-deps/aws-sdk-go/private/waiter.Waiter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。