Documentation
¶
Index ¶
- Constants
- func GetNewLineSeparator() string
- func GetenvOrDefault(key string, def string) string
- func Rename(ctx context.Context, old, new string) error
- func RunningFromPipeline() bool
- type ExpandableString
- func (e ExpandableString) Empty() bool
- func (e ExpandableString) Envsubst(mapping func(string) string) (string, error)
- func (e ExpandableString) MarshalYAML() (interface{}, error)
- func (e ExpandableString) MustEnvsubst(mapping func(string) string) string
- func (e *ExpandableString) UnmarshalYAML(unmarshal func(interface{}) error) error
- type RetryStrategy
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func GetNewLineSeparator ¶
func GetNewLineSeparator() string
func GetenvOrDefault ¶
GetenvOrDefault behaves like `os.Getenv`, except it returns a specified default value if the key is not present in the environment.
func RunningFromPipeline ¶
func RunningFromPipeline() bool
Types ¶
type ExpandableString ¶
type ExpandableString struct {
// contains filtered or unexported fields
}
ExpandableString is a string that has ${foo} style references inside which can be evaluated.
func NewExpandableString ¶
func NewExpandableString(template string) ExpandableString
func (ExpandableString) Empty ¶
func (e ExpandableString) Empty() bool
Empty returns true if the template is empty.
func (ExpandableString) Envsubst ¶
func (e ExpandableString) Envsubst(mapping func(string) string) (string, error)
Envsubst evaluates the template, substituting values as envsubst.Eval would.
func (ExpandableString) MarshalYAML ¶
func (e ExpandableString) MarshalYAML() (interface{}, error)
func (ExpandableString) MustEnvsubst ¶
func (e ExpandableString) MustEnvsubst(mapping func(string) string) string
MustEnvsubst evaluates the template, substituting values as envsubst.Eval would and panics if there is an error (for example, the string is malformed).
func (*ExpandableString) UnmarshalYAML ¶
func (e *ExpandableString) UnmarshalYAML(unmarshal func(interface{}) error) error
type RetryStrategy ¶
type RetryStrategy struct { // The maximum number of retries before failing MaxRetries uint64 // The time between each retry attempt RetryBackoff time.Duration }
func NewRetryStrategy ¶
func NewRetryStrategy(maxRetries uint64, retryBackoff time.Duration) *RetryStrategy
Creates a new retry strategy that also reduces the time for when running in test
Source Files
¶
Click to show internal directories.
Click to hide internal directories.