utils

package
v0.99.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoEmptyStringToCsv added in v0.90.0

func NoEmptyStringToCsv(strs ...string) string

NoEmptyStringToCsv takes a bunch of strings, filters out empty ones and returns a csv version of the string

func TraceCaller added in v0.90.0

func TraceCaller()

Types

type RetryStrategy

type RetryStrategy struct {
	Wait             func(time.Duration)
	WaitTime         time.Duration
	WaitTimeIncrease time.Duration
	MaxTries         int
	Try              func() error
	OnMaxTries       func()
	OnSuccess        func()
}

RetryStrategy specifies a strategy to retry an operation after waiting a while, with hooks for successful and unsuccessful (>=max) tries.

func (RetryStrategy) DoStrategy

func (rs RetryStrategy) DoStrategy()

DoStrategy does the retry strategy specified in the struct, waiting before retrying an operator, up to a max number of tries, and if executes a success "finalizer" operation if a retry is successful

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL