github.com/mwhudson/juju@v0.0.0-20160512215208-90ff01f3497f/apiserver/params/retrystrategy.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Copyright 2016 Cloudbase Solutions 3 // Licensed under the AGPLv3, see LICENCE file for details. 4 5 package params 6 7 import ( 8 "time" 9 ) 10 11 // RetryStrategy holds the necessary information to configure retries. 12 type RetryStrategy struct { 13 ShouldRetry bool 14 MinRetryTime time.Duration 15 MaxRetryTime time.Duration 16 JitterRetryTime bool 17 RetryTimeFactor int64 18 } 19 20 // RetryStrategyResult holds a RetryStrategy or an error. 21 type RetryStrategyResult struct { 22 Error *Error 23 Result *RetryStrategy 24 } 25 26 // RetryStrategyResults holds the bulk operation result of an API call 27 // that returns a RetryStrategy or an error. 28 type RetryStrategyResults struct { 29 Results []RetryStrategyResult 30 }