Documentation
¶
Index ¶
- func BoolOrDefault(input *bool, defaultValue ...bool) bool
- func DurationOrDefault(input *time.Duration, defaultValue ...time.Duration) time.Duration
- func IntOrDefault(input *int, defaultValue ...int) int
- func NewBool(input bool) *bool
- func NewBoolOrNil(input *bool) *bool
- func NewDuration(input time.Duration) *time.Duration
- func NewDurationOrNil(input *time.Duration) *time.Duration
- func NewInt(input int) *int
- func NewIntOrNil(input *int) *int
- func NewPullPolicy(input v1.PullPolicy) *v1.PullPolicy
- func NewPullPolicyOrNil(input *v1.PullPolicy) *v1.PullPolicy
- func NewString(input string) *string
- func NewStringOrNil(input *string) *string
- func PullPolicyOrDefault(input *v1.PullPolicy, defaultValue ...v1.PullPolicy) v1.PullPolicy
- func StringOrDefault(input *string, defaultValue ...string) string
- type Interval
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolOrDefault ¶
BoolOrDefault returns the default value (or false) if input is nil, otherwise returns the referenced value.
func DurationOrDefault ¶
DurationOrDefault returns the default value (or 0) if input is nil, otherwise returns the referenced value.
func IntOrDefault ¶
IntOrDefault returns the default value (or 0) if input is nil, otherwise returns the referenced value.
func NewBoolOrNil ¶
NewBoolOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func NewDuration ¶
NewDuration returns a reference to a duration with given value.
func NewDurationOrNil ¶
NewDurationOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func NewIntOrNil ¶
NewIntOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func NewPullPolicy ¶
func NewPullPolicy(input v1.PullPolicy) *v1.PullPolicy
NewPullPolicy returns a reference to a pull policy with given value.
func NewPullPolicyOrNil ¶
func NewPullPolicyOrNil(input *v1.PullPolicy) *v1.PullPolicy
NewPullPolicyOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func NewStringOrNil ¶
NewStringOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func PullPolicyOrDefault ¶
func PullPolicyOrDefault(input *v1.PullPolicy, defaultValue ...v1.PullPolicy) v1.PullPolicy
PullPolicyOrDefault returns the default value (or 0) if input is nil, otherwise returns the referenced value.
func StringOrDefault ¶
StringOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
Types ¶
type Interval ¶
Interval is a specialization of Duration so we can add some helper functions to that.
func (Interval) After ¶
After waits for the interval to elapse and then sends the current time on the returned channel.
func (Interval) IncreaseTo ¶
IncreaseTo returns an interval that is equal to max(x, i).