Documentation
      ¶
    
    
  
    
  
    Index ¶
- func AsFloat64OrNil(data interface{}) *float64
 - func AsInt64OrNil(data interface{}) *int64
 - func AsIntOrNil(data interface{}) *int
 - func AsStringOrNil(data interface{}) *string
 - func Float64Ref(number float64) *float64
 - func Int64FromRef(number *int64) int64
 - func Int64Ref(number int64) *int64
 - func Int64RefOrNil(number int64) *int64
 - func Int64Value(number *int64) int64
 - func IntFromRef(ref *int) int
 - func IntRef(number int) *int
 - func IntRefOrNil(number int) *int
 - func MaxDuration(d1, d2 time.Duration, ds ...time.Duration) time.Duration
 - func MinDuration(d1, d2 time.Duration, ds ...time.Duration) time.Duration
 - func Partition(items []string, maxItems int) [][]string
 - func StringFromRef(str *string) string
 - func StringRef(str string) *string
 - func StringRefOrNil(str string) *string
 - func StringValueOrDefault(str string, def string) string
 - func WithAttempts(attempts int, main func() error) error
 - func WithBackoff(duration time.Duration, main func() error) func() error
 - func WithBackoffCancelling(unit time.Duration, max time.Duration, main func() bool) func()
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64FromRef ¶ added in v3.0.1
Int64FromRef returns value
func Int64Value ¶
Int64Value kept to prevent breaking change. TODO: Deprecate in v4
func IntFromRef ¶ added in v3.0.1
IntFromRef returns 0 if nil, dereferenced value otherwhise.
func MaxDuration ¶
MaxDuration returns the max duration among them
func MinDuration ¶
MinDuration returns the min duration among them
func StringFromRef ¶ added in v3.0.1
StringFromRef returns original value if not empty. Default otherwise.
func StringValueOrDefault ¶
StringValueOrDefault returns original value if not empty. Default otherwise.
func WithAttempts ¶
WithAttempts executes a function N times or until no error is returned
func WithBackoff ¶
WithBackoff wraps the function to add Exponential backoff
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.