Documentation ¶
Index ¶
- Constants
- func ConvertInterfaceToMapInterfaceInterface(in interface{}) (map[interface{}]interface{}, error)
- func ConvertInterfaceToSliceInterface(in interface{}) ([]interface{}, error)
- func ElementInSlice(e interface{}, s interface{}) (bool, error)
- func KeyInMap(k interface{}, m interface{}) (bool, error)
- func Retry(doFunc func() error, attempts int64, delay, timeout time.Duration) error
- func RetryWithRetryOption(doFunc func() error, opts ...RetryOption) (err error)
- func TrimSpaceOfStructString(in interface{}) error
- func ValueInMap(v interface{}, m interface{}) (bool, error)
- type RetryOption
Constants ¶
View Source
const ( DefaultAttempts int64 = 10 DefaultDelay = 500 * time.Millisecond DefaultTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ConvertInterfaceToMapInterfaceInterface ¶
func ConvertInterfaceToMapInterfaceInterface(in interface{}) (map[interface{}]interface{}, error)
func ConvertInterfaceToSliceInterface ¶
func ConvertInterfaceToSliceInterface(in interface{}) ([]interface{}, error)
func ElementInSlice ¶
func Retry ¶ added in v0.1.4
RetryWithRetryOption retries the func until it returns no error or reaches attempts limit or timed out, either one is earlier
func RetryWithRetryOption ¶ added in v0.1.4
func RetryWithRetryOption(doFunc func() error, opts ...RetryOption) (err error)
RetryWithRetryOption retries the func until it returns no error or reaches attempts limit or timed out, either one is earlier
func TrimSpaceOfStructString ¶
func TrimSpaceOfStructString(in interface{}) error
func ValueInMap ¶
Types ¶
type RetryOption ¶ added in v0.1.4
RetryOption is options for Retry()
func NewRetryOption ¶ added in v0.1.4
func NewRetryOption(attempts int64, delay, timeout time.Duration) RetryOption
NewRetryOption returns RetryOption
Click to show internal directories.
Click to hide internal directories.