本文整理匯總了Golang中github.com/aws/aws-sdk-go/aws.Config.MaxRetries方法的典型用法代碼示例。如果您正苦於以下問題:Golang Config.MaxRetries方法的具體用法?Golang Config.MaxRetries怎麽用?Golang Config.MaxRetries使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/aws/aws-sdk-go/aws.Config
的用法示例。
在下文中一共展示了Config.MaxRetries方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: getService
func getService(debug bool) *route53.Route53 {
config := aws.Config{}
// ensures throttled requests are retried
config.MaxRetries = aws.Int(100)
if debug {
config.LogLevel = aws.LogLevel(aws.LogDebug)
}
return route53.New(&config)
}
示例2: getService
func getService(debug bool, profile string) *route53.Route53 {
config := aws.Config{}
if profile != "" {
config.Credentials = credentials.NewSharedCredentials("", profile)
}
// ensures throttled requests are retried
config.MaxRetries = aws.Int(100)
if debug {
config.LogLevel = aws.LogLevel(aws.LogDebug)
}
return route53.New(session.New(), &config)
}
示例3: getConfig
func getConfig(c *cli.Context) *aws.Config {
debug := c.Bool("debug")
profile := c.String("profile")
config := aws.Config{}
if profile != "" {
config.Credentials = credentials.NewSharedCredentials("", profile)
}
// ensures throttled requests are retried
config.MaxRetries = aws.Int(100)
if debug {
config.LogLevel = aws.LogLevel(aws.LogDebug)
}
return &config
}
示例4: getService
func getService() *route53.Route53 {
config := aws.Config{}
// ensures throttled requests are retried
config.MaxRetries = aws.Int(100)
return route53.New(session.New(), &config)
}